aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_wlan.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-10-23 15:18:48 +0000
committerChristian Grothoff <christian@grothoff.org>2011-10-23 15:18:48 +0000
commit1207885b627afe3bcdb5fafa17a4edf2730882ef (patch)
tree6c9c231aba928a6def475977f42d175cb09cf955 /src/transport/plugin_transport_wlan.c
parent4db8b7f55e29c77d107257386de1bf75062caee3 (diff)
downloadgnunet-1207885b627afe3bcdb5fafa17a4edf2730882ef.tar.gz
gnunet-1207885b627afe3bcdb5fafa17a4edf2730882ef.zip
Adding FIXMEs: if delay is FOREVER, session should be terminated
Diffstat (limited to 'src/transport/plugin_transport_wlan.c')
-rw-r--r--src/transport/plugin_transport_wlan.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c
index b3faf4480..160b5924c 100644
--- a/src/transport/plugin_transport_wlan.c
+++ b/src/transport/plugin_transport_wlan.c
@@ -2333,7 +2333,7 @@ process_data (void *cls, void *client, const struct GNUNET_MessageHeader *hdr)
2333 GNUNET_assert (cls != NULL); 2333 GNUNET_assert (cls != NULL);
2334 struct Session *session = (struct Session *) client; 2334 struct Session *session = (struct Session *) client;
2335 struct Plugin *plugin = (struct Plugin *) cls; 2335 struct Plugin *plugin = (struct Plugin *) cls;
2336 2336 struct GNUNET_TIME_Relative delay;
2337 struct GNUNET_ATS_Information distance; 2337 struct GNUNET_ATS_Information distance;
2338 2338
2339 distance.type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE); 2339 distance.type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE);
@@ -2348,11 +2348,16 @@ process_data (void *cls, void *client, const struct GNUNET_MessageHeader *hdr)
2348 htons (hdr->size)); 2348 htons (hdr->size));
2349#endif 2349#endif
2350 2350
2351 plugin->env->receive (plugin->env->cls, &(session->target), hdr, 2351 delay = plugin->env->receive (plugin->env->cls, &(session->target), hdr,
2352 (const struct GNUNET_ATS_Information *) 2352 (const struct GNUNET_ATS_Information *)
2353 &distance, 1, session, 2353 &distance, 1, session,
2354 (const char *) &session->mac->addr, 2354 (const char *) &session->mac->addr,
2355 sizeof (session->mac->addr)); 2355 sizeof (session->mac->addr));
2356 if (delay.rel_value == GNUNET_TIME_UNIT_FOREVER_REL.rel_value)
2357 {
2358 // FIXME: terminate session!
2359 }
2360
2356} 2361}
2357 2362
2358/** 2363/**