|author||Guy Harris <firstname.lastname@example.org>||2016-09-05 16:26:29 -0700|
|committer||Guy Harris <email@example.com>||2016-09-05 23:27:02 +0000|
Have scan_plugins() take an argument specify what to do on load failures.
That's a less gross hack to suppress load failures due to not having libwiretap than providing a no-op failure-message routine, as it at least allows other code using a failure-message routine, such as cmdarg_err() and routines that call it, to be used. We really should put libwiretap and libwireshark plugins into separate subdirectories of the plugin directories, and avoid even looking at libwireshark plugins in programs that don't use libwireshark. Change-Id: I0a6ec01ecb4e718ed36233cfaf638a317f839a73 Reviewed-on: https://code.wireshark.org/review/17506 Reviewed-by: Guy Harris <firstname.lastname@example.org>
Diffstat (limited to 'randpkt.c')
1 files changed, 12 insertions, 7 deletions
@@ -49,14 +49,14 @@
- * Don't report failures to load plugins because most (non-wiretap) plugins
- * *should* fail to load (because we're not linked against libwireshark and
- * dissector plugins need libwireshark).
+ * General errors are reported with an console message in randpkt.
-failure_message(const char *msg_format _U_, va_list ap _U_)
+failure_message(const char *msg_format, va_list ap)
+ fprintf(stderr, "randpkt: ");
+ vfprintf(stderr, msg_format, ap);
+ fprintf(stderr, "\n");
@@ -141,8 +141,13 @@ main(int argc, char **argv)
/* Scan for plugins. This does *not* call their registration routines;
- that's done later. */
+ that's done later.
+ Don't report failures to load plugins because most
+ (non-wiretap) plugins *should* fail to load (because
+ we're not linked against libwireshark and dissector
+ plugins need libwireshark). */
/* Register all libwiretap plugin modules. */