From 00273300e721999ac67a4ce66dab80fed6a1314f Mon Sep 17 00:00:00 2001 From: Lars Roland Date: Sat, 5 Mar 2005 06:28:10 +0000 Subject: Preparations for dropping the old plugin api. Introduce a new init routine for plugins, which does not take the plugin api table as an argument and allows etheral to distinguish between plugins using the old and the new api. Update README.plugins accordingly Change all g_warnings() in epan/plugins.c to report_failue(). On windows we do not have a log console open while loading the plugins, because a log console cannot be opened before the prefs have been read. Thus g_warnings() does not work for reporting problems with plugins. svn path=/trunk/; revision=13596 --- plugins/rlm/Makefile.nmake | 7 +++---- plugins/rlm/packet-rlm.c | 11 +---------- 2 files changed, 4 insertions(+), 14 deletions(-) (limited to 'plugins/rlm') diff --git a/plugins/rlm/Makefile.nmake b/plugins/rlm/Makefile.nmake index 41c22fd2ed..11357bc078 100644 --- a/plugins/rlm/Makefile.nmake +++ b/plugins/rlm/Makefile.nmake @@ -11,12 +11,9 @@ CFLAGS=/DHAVE_CONFIG_H /I../.. /I../../wiretap $(GLIB_CFLAGS) \ LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS) -!IFDEF LINK_PLUGINS_WITH_LIBETHEREAL +!IFDEF ENABLE_LIBETHEREAL LINK_PLUGIN_WITH=..\..\epan\libethereal.lib CFLAGS=/DHAVE_WIN32_LIBETHEREAL_LIB /D_NEED_VAR_IMPORT_ $(CFLAGS) -!ELSE -LINK_PLUGIN_WITH=..\plugin_api.obj -!ENDIF OBJECTS=packet-rlm.obj @@ -24,6 +21,8 @@ rlm.dll rlm.exp rlm.lib : $(OBJECTS) $(LINK_PLUGIN_WITH) link -dll /out:rlm.dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \ $(GLIB_LIBS) +!ENDIF + clean: rm -f $(OBJECTS) rlm.dll rlm.exp rlm.lib *.pdb diff --git a/plugins/rlm/packet-rlm.c b/plugins/rlm/packet-rlm.c index 1b0fe320f0..aeee463172 100644 --- a/plugins/rlm/packet-rlm.c +++ b/plugins/rlm/packet-rlm.c @@ -62,8 +62,6 @@ #include #include -#include "plugins/plugin_api.h" -#include "plugins/plugin_api_defs.h" /* Define version if we are not building ethereal statically */ #include "moduleinfo.h" @@ -244,15 +242,8 @@ proto_register_rlm(void) #ifndef ENABLE_STATIC G_MODULE_EXPORT void -plugin_init(plugin_address_table_t *pat -#ifndef PLUGINS_NEED_ADDRESS_TABLE -_U_ -#endif -) +new_plugin_init(void) { - - /* initialise the table of pointers needed in Win32 DLLs */ - plugin_address_table_init(pat); /* register the new protocol, protocol fields, and subtrees */ if (proto_rlm == -1) { /* execute protocol initialization only once */ proto_register_rlm(); -- cgit v1.2.1