while (queue != NULL){
// content is never NULL
- GNUNET_assert (queue->content == NULL);
+ GNUNET_assert (queue->content != NULL);
// is session already in queue?
if (session == queue->content){
return;
if (plugin->server_write_delay_task != GNUNET_SCHEDULER_NO_TASK)
{
GNUNET_SCHEDULER_cancel(plugin->server_write_delay_task);
+ plugin->server_write_delay_task = GNUNET_SCHEDULER_NO_TASK;
}
fm = plugin->pending_Fragment_Messages_head;
uint copyoffset = 0;
struct AckQueue * akt = NULL;
-#if 1
+
struct GNUNET_MessageHeader * msgheader2 = NULL;
//test if a "hello-beacon" has to be send
- if (GNUNET_TIME_absolute_get_remaining(plugin->beacon_time).rel_value == 0)
+ if (0==1)
+ //if (GNUNET_TIME_absolute_get_remaining(plugin->beacon_time).rel_value == 0)
{
//check if the message is not to big
GNUNET_assert(sizeof(struct WlanHeader) + GNUNET_HELLO_size(
}
-#endif
+
fm = plugin->pending_Fragment_Messages_head;
GNUNET_assert(fm != NULL);
const void *addr,
size_t addrlen)
{
- char ret[92];
+ static char ret[40];
const unsigned char * input;
GNUNET_assert(cls !=NULL);
"%s Mac-Adress %X:%X:%X:%X:%X:%X",
PROTOCOL_PREFIX,
input[0], input[1], input[2], input[3], input[4], input[5]);
- return GNUNET_strdup (ret);
+ return ret;
}
/**
return;
}
-#if DEBUG_wlan
- GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
- "After crc\n");
-#endif
-
//if not in session list
if (session == NULL)
{
//try if it is a hello message
if (ntohs(temp_hdr->type) == GNUNET_MESSAGE_TYPE_HELLO)
{
-#if DEBUG_wlan
- GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
- "New WLAN Client\n");
-#endif
session = create_session(plugin, session_light->addr);
session_light->session = session;
GNUNET_assert(GNUNET_HELLO_get_id(
}
}
-#if DEBUG_wlan
- GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
- "After session\n");
-#endif
-
//"receive" the message
struct GNUNET_TRANSPORT_ATS_Information distance[2];
distance[0].type = htonl(GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE);
distance[0].value = htonl(1);
distance[1].type = htonl(GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR);
distance[1].value = htonl(0);
-#if DEBUG_wlan
- GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
- "After Information\n");
-#endif
- plugin->env->receive(plugin->env, &(session->target), temp_hdr,
+ plugin->env->receive(plugin->env->cls, &(session->target), temp_hdr,
(const struct GNUNET_TRANSPORT_ATS_Information *) &distance, 2,
session, session->addr, sizeof(session->addr));
-#if DEBUG_wlan
- GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
- "After receive\n");
-#endif
}
return;
}
-#if DEBUG_wlan
+#if 0
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
"Helper finished\n");
#endif