aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/opsi
diff options
context:
space:
mode:
authorLars Roland <Lars.Roland@gmx.net>2005-03-05 06:28:10 +0000
committerLars Roland <Lars.Roland@gmx.net>2005-03-05 06:28:10 +0000
commit00273300e721999ac67a4ce66dab80fed6a1314f (patch)
treeac2c8b87fdd4dc989c3ef1d3b646f7700ba7626c /plugins/opsi
parent1a7b3ec1439203e3bea3381dfb31b4357758b4c3 (diff)
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
Diffstat (limited to 'plugins/opsi')
-rw-r--r--plugins/opsi/Makefile.nmake7
-rw-r--r--plugins/opsi/packet-opsi.c11
2 files changed, 4 insertions, 14 deletions
diff --git a/plugins/opsi/Makefile.nmake b/plugins/opsi/Makefile.nmake
index 47f8cef88b..cabc2f44cd 100644
--- a/plugins/opsi/Makefile.nmake
+++ b/plugins/opsi/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-opsi.obj
@@ -24,6 +21,8 @@ opsi.dll opsi.exp opsi.lib : $(OBJECTS) $(LINK_PLUGIN_WITH)
link -dll /out:opsi.dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \
$(GLIB_LIBS)
+!ENDIF
+
clean:
rm -f $(OBJECTS) opsi.dll opsi.exp opsi.lib *.pdb
diff --git a/plugins/opsi/packet-opsi.c b/plugins/opsi/packet-opsi.c
index 3d0cdd5a91..2fc4275951 100644
--- a/plugins/opsi/packet-opsi.c
+++ b/plugins/opsi/packet-opsi.c
@@ -27,10 +27,8 @@
# include "config.h"
#endif
-#include "plugins/plugin_api.h"
#include "moduleinfo.h"
#include <gmodule.h>
-#include "plugins/plugin_api_defs.h"
#include <stdio.h>
#include <stdlib.h>
@@ -808,15 +806,8 @@ proto_reg_handoff_opsi(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_opsi == -1) { /* execute protocol initialization only once */
proto_register_opsi();