Commit Graph

7 Commits

Author SHA1 Message Date
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')

Fix manually some typo (in export_object_dicom.c and crc16-plain.c)

Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04 14:27:33 +00:00
Alexis La Goutte d26b7fc516 Fix (-W)documentation error found by Clang
../../epan/wmem/wmem_user_cb.h:52:11: error: parameter 'allocator' not found in the function declaration
      [-Werror,-Wdocumentation]
 * @param allocator The allocator that triggered this callback.
          ^~~~~~~~~
../../epan/wmem/wmem_user_cb.h:53:11: error: parameter 'event' not found in the function declaration
      [-Werror,-Wdocumentation]
 * @param event     The event type that triggered this callback.
          ^~~~~
../../epan/wmem/wmem_user_cb.h:54:11: error: parameter 'user_data' not found in the function declaration
      [-Werror,-Wdocumentation]
 * @param user_data Whatever user_data was originally passed to the call to
          ^~~~~~~~~
../../epan/wmem/wmem_user_cb.h:63:11: error: parameter 'recurring' not found in the function declaration
      [-Werror,-Wdocumentation]
 * @param recurring If this is FALSE then the callback is called exactly once.
          ^~~~~~~~~
4 errors generated.

svn path=/trunk/; revision=51259
2013-08-10 21:28:42 +00:00
Evan Huus 55264582be More callback tweaks, to permit unregistering a callback from the same place
it was originally registered.

svn path=/trunk/; revision=49969
2013-06-16 22:37:55 +00:00
Evan Huus 88c5b2e892 Rework the user callback code a bit to make it saner to use with the auto-reset
trees.

svn path=/trunk/; revision=49966
2013-06-16 22:07:24 +00:00
Evan Huus a9c35aa4b6 First batch of doxygen for wmem. Remove some things from README.wmem now that
they're in doxygen instead.

svn path=/trunk/; revision=49583
2013-05-26 02:40:40 +00:00
Evan Huus d860a01aaf Round two of wmem cleanup callbacks. While the emem tree behaviour will require
recurring callbacks, I suspect most other potential uses will be once-only, so
make that possible, and improve the documentation on the remaining issues.

Also separate out the code into its own files and the testing into its own
test case.

svn path=/trunk/; revision=49209
2013-05-08 01:14:01 +00:00
Evan Huus 2e92c6dfde Add user callbacks to wmem. This feature is a generic way to transparently mimic
the behaviour emem has for seasonal trees, which is that the master tree
structure is not actually seasonal - it is permanent. When the seasonal memory
pool is cleared, the root node pointer in all of these permanent trees is set
to NULL, and the pool takes care of actually freeing the nodes.

Wmem can now mimic this by allocating the tree header struct in epan_scope(),
allocating any node structs in file_scope(), and registering a callback on
file_scope() that NULLs the pointer in the epan_scope() header. Yes, this is
confusing, but it seemed simpler than adding manual callback registrations to
every single dissector that currently uses seasonal trees.

The callbacks may also be useful for other things that need cleanup (I'm
thinking resource handles stored in wmem memory that need to be fclosed or
what-have-you before they the handle is lost).

As indicated by the number of caveats in README.wmem, the implementation
probably needs a bit of work to make it safer/saner/more-useful. Thoughts
(or patches!) in this direction are more than welcome.

svn path=/trunk/; revision=49205
2013-05-07 19:23:10 +00:00