diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2011-12-13 15:19:16 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2011-12-13 15:19:16 +0000 |
commit | 46e6c331e6c462f2de9f168b25276dbc7970760e (patch) | |
tree | 57efc16c478f9303df350c90d7212a3c9e100ff0 /src/transport/plugin_transport_wlan.c | |
parent | b123d4d0fd1483966936d0997cd26fa0b6a0f6b5 (diff) | |
download | gnunet-46e6c331e6c462f2de9f168b25276dbc7970760e.tar.gz gnunet-46e6c331e6c462f2de9f168b25276dbc7970760e.zip |
address type in WLAN
Diffstat (limited to 'src/transport/plugin_transport_wlan.c')
-rw-r--r-- | src/transport/plugin_transport_wlan.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c index de89cd86c..b741c976e 100644 --- a/src/transport/plugin_transport_wlan.c +++ b/src/transport/plugin_transport_wlan.c | |||
@@ -2686,11 +2686,12 @@ process_data (void *cls, void *client, const struct GNUNET_MessageHeader *hdr) | |||
2686 | GNUNET_assert (cls != NULL); | 2686 | GNUNET_assert (cls != NULL); |
2687 | struct Session *session = (struct Session *) client; | 2687 | struct Session *session = (struct Session *) client; |
2688 | struct Plugin *plugin = (struct Plugin *) cls; | 2688 | struct Plugin *plugin = (struct Plugin *) cls; |
2689 | struct GNUNET_ATS_Information ats[2]; | ||
2689 | 2690 | ||
2690 | struct GNUNET_ATS_Information distance; | 2691 | ats[0].type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE); |
2691 | 2692 | ats[0].value = htonl (1); | |
2692 | distance.type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE); | 2693 | ats[1].type = htonl (GNUNET_ATS_NETWORK_TYPE); |
2693 | distance.value = htonl (1); | 2694 | ats[1].value = htonl (GNUNET_ATS_NET_LAN); |
2694 | 2695 | ||
2695 | #if DEBUG_wlan | 2696 | #if DEBUG_wlan |
2696 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, PLUGIN_LOG_NAME, | 2697 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, PLUGIN_LOG_NAME, |
@@ -2702,7 +2703,7 @@ process_data (void *cls, void *client, const struct GNUNET_MessageHeader *hdr) | |||
2702 | #endif | 2703 | #endif |
2703 | 2704 | ||
2704 | plugin->env->receive (plugin->env->cls, &(session->target), hdr, | 2705 | plugin->env->receive (plugin->env->cls, &(session->target), hdr, |
2705 | (const struct GNUNET_ATS_Information *) &distance, 1, | 2706 | (const struct GNUNET_ATS_Information *) &ats, 2, |
2706 | session, (const char *) &session->mac->addr, | 2707 | session, (const char *) &session->mac->addr, |
2707 | sizeof (session->mac->addr)); | 2708 | sizeof (session->mac->addr)); |
2708 | } | 2709 | } |