From a6da501b9d09b97c8e5949a2e81a66fc9de9bb5a Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Thu, 18 Oct 2012 01:51:06 +0000 Subject: [PATCH] Partially initialized the helper --- tests/udp.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/udp.c b/tests/udp.c index f1e82c4..524932a 100644 --- a/tests/udp.c +++ b/tests/udp.c @@ -37,6 +37,7 @@ static int _udp(char const * name) { char * cwd; Plugin * plugin; + AppTransportPluginHelper helper; AppTransportPluginDefinition * plugind; AppTransportPlugin * server; AppTransportPlugin * client; @@ -54,9 +55,13 @@ static int _udp(char const * name) plugin_delete(plugin); return error_print("udp"); } + /* initialize the helper */ + memset(&helper, 0, sizeof(helper)); + helper.event = event_new(); /* XXX check errors */ + /* FIXME really implement */ /* create a server and a client */ - server = plugind->init(NULL, ATM_SERVER, name); - client = plugind->init(NULL, ATM_CLIENT, name); + server = plugind->init(&helper, ATM_SERVER, name); + client = plugind->init(&helper, ATM_CLIENT, name); if(server == NULL || client == NULL) { if(client != NULL) @@ -67,6 +72,9 @@ static int _udp(char const * name) return error_print("udp"); } /* FIXME really implement */ + plugind->destroy(client); + plugind->destroy(server); + event_delete(helper.event); plugin_delete(plugin); return 0; }