#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
* 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
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));
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;
#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
GNUNET_assert(cls !=NULL);
- fprintf(stderr,"HERE");
plugin = GNUNET_malloc (sizeof (struct Plugin));
plugin->env = env;
plugin->pendingsessions = 0;