doxygen
[oweals/gnunet.git] / src / transport / plugin_transport_wlan.c
index d3c7d21508cc1c46db26a3bebc7ab0fa5d83232f..003a77248527fa217b05a4f0ea3a7432c9a1381e 100644 (file)
@@ -49,7 +49,7 @@
 
 #define FRAGMENT_QUEUE_SIZE 10
 
-#define DEBUG_wlan GNUNET_NO
+#define DEBUG_wlan GNUNET_YES
 
 #define MESSAGE_LENGHT_UNKNOWN -1
 #define NO_MESSAGE_OR_MESSAGE_FINISHED -2
@@ -997,7 +997,7 @@ check_finished_fragment(struct Plugin * plugin, struct FragmentMessage * fm){
  * Function called to when wlan helper is ready to get some data
  *
  * @param cls closure
- * @param GNUNET_SCHEDULER_TaskContext
+ * @param tc GNUNET_SCHEDULER_TaskContext
  */
 
 static void
@@ -1725,7 +1725,6 @@ wlan_data_helper(void *cls, void * client, const struct GNUNET_MessageHeader * h
         distance[0].value = htonl (1);
         distance[1].type = htonl (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR);
         distance[1].value = htonl (0);
-
         plugin->env->receive(plugin, &session->target,
              temp_hdr, (const struct GNUNET_TRANSPORT_ATS_Information *) &distance, 2,
              session, session->addr, sizeof(session->addr));
@@ -1994,7 +1993,7 @@ wlan_plugin_helper_read (void *cls,
 static int
 wlan_transport_start_wlan_helper(struct Plugin *plugin, int testmode)
 {
-
+  char * filename = "gnunet-transport-wlan-helper";
   plugin->server_stdout = GNUNET_DISK_pipe(GNUNET_YES, GNUNET_NO, GNUNET_YES);
   if (plugin->server_stdout == NULL)
     return GNUNET_SYSERR;
@@ -2005,12 +2004,12 @@ wlan_transport_start_wlan_helper(struct Plugin *plugin, int testmode)
 
 #if DEBUG_wlan
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-      "Starting gnunet-wlan-helper process cmd: %s %s\n", "gnunet-wlan-helper", plugin->interface);
+      "Starting gnunet-wlan-helper process cmd: %s %s %i\n", filename, plugin->interface, testmode);
 #endif
   /* Start the server process */
+
   plugin->server_proc = GNUNET_OS_start_process(plugin->server_stdin,
-      plugin->server_stdout, "gnunet-transport-wlan-helper",
-      plugin->interface, testmode, NULL);
+                 plugin->server_stdout, filename,filename, plugin->interface, ((testmode==1)?"1":"0"), NULL);
   if (plugin->server_proc == NULL)
     {
 #if DEBUG_wlan
@@ -2077,7 +2076,6 @@ libgnunet_plugin_transport_wlan_init (void *cls)
 
   GNUNET_assert(cls !=NULL);
 
-  fprintf(stderr,"HERE");
   plugin = GNUNET_malloc (sizeof (struct Plugin));
   plugin->env = env;
   plugin->pendingsessions = 0;