#include "gnunet-helper-vpn-api.h"
#include "gnunet-vpn-checksum.h"
+GNUNET_SCHEDULER_TaskIdentifier shs_task;
+
/**
* The handle to the configuration used throughout the process
*/
restart_hijack = 1;
if (NULL != dns_connection)
GNUNET_CLIENT_notify_transmit_ready(dns_connection, sizeof(struct GNUNET_MessageHeader), GNUNET_TIME_UNIT_FOREVER_REL, GNUNET_YES, &send_query, NULL);
+
+ GNUNET_SCHEDULER_add_write_file (GNUNET_TIME_UNIT_FOREVER_REL, helper_handle->fh_to_helper, &helper_write, NULL);
}
/*}}}*/
void schedule_helper_write(struct GNUNET_TIME_Relative time, void* cls)
{
+ if (GNUNET_SCHEDULER_NO_TASK == shs_task) return;
GNUNET_SCHEDULER_add_write_file (time, helper_handle->fh_to_helper, &helper_write, cls);
}
GNUNET_SERVER_mst_destroy(handle->mst);
}
+extern GNUNET_SCHEDULER_TaskIdentifier shs_task;
+
/**
* Read from the helper-process
*/
stop_helper (handle);
/* Restart the helper */
- GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
+ shs_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
handle->restart_task, handle);
return;
}
stop_helper (handle);
/* Restart the helper */
- GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
+ shs_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
handle->restart_task, handle);
return;