aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_wlan.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2013-10-07 13:58:09 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2013-10-07 13:58:09 +0000
commit6987c2bcfeb806cb4c223c8766ccfcd4358644b6 (patch)
treefec938c872a1605dcfcdcd6e6b41f8f57509439b /src/transport/plugin_transport_wlan.c
parent297e089292b5acba6e0a2d560ec172e1ff41c89e (diff)
downloadgnunet-6987c2bcfeb806cb4c223c8766ccfcd4358644b6.tar.gz
gnunet-6987c2bcfeb806cb4c223c8766ccfcd4358644b6.zip
fix for incoming addresses:
incoming addresses are only marked with address length 0 if the address cannot be used to initiate a connection to his address. Therefor only for tcp and http(s) incoming connections an address length of 0 is reported whereas for other plugins (unix, udp, wlan) the incoming address can be used to initiate a connection to this address.
Diffstat (limited to 'src/transport/plugin_transport_wlan.c')
-rw-r--r--src/transport/plugin_transport_wlan.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c
index 932d3b762..43d367ac5 100644
--- a/src/transport/plugin_transport_wlan.c
+++ b/src/transport/plugin_transport_wlan.c
@@ -1367,14 +1367,15 @@ process_data (void *cls, void *client, const struct GNUNET_MessageHeader *hdr)
1367 break; 1367 break;
1368 } 1368 }
1369 xmas.endpoint = mas->endpoint; 1369 xmas.endpoint = mas->endpoint;
1370 if (NULL == (xmas.session = lookup_session (mas->endpoint, &wlanheader->sender, GNUNET_YES))) 1370 if (NULL == (xmas.session = lookup_session (mas->endpoint, &wlanheader->sender, GNUNET_YES)))
1371 { 1371 {
1372 xmas.session = create_session (mas->endpoint, &wlanheader->sender, GNUNET_YES); 1372 xmas.session = create_session (mas->endpoint, &wlanheader->sender, GNUNET_YES);
1373 plugin->env->session_start (NULL, &wlanheader->sender, 1373 plugin->env->session_start (NULL, &wlanheader->sender,
1374 PLUGIN_NAME, NULL, 0, xmas.session, NULL, 0); 1374 PLUGIN_NAME, &mas->endpoint->addr,
1375 sizeof (struct WlanAddress), xmas.session, NULL, 0);
1375 LOG (GNUNET_ERROR_TYPE_DEBUG, 1376 LOG (GNUNET_ERROR_TYPE_DEBUG,
1376 "Notifying transport about peer `%s''s new inbound session %p \n", 1377 "Notifying transport about peer `%s''s new inbound session %p \n",
1377 GNUNET_i2s (&wlanheader->sender), xmas.session); 1378 GNUNET_i2s (&wlanheader->sender), xmas.session);
1378 } 1379 }
1379 LOG (GNUNET_ERROR_TYPE_DEBUG, 1380 LOG (GNUNET_ERROR_TYPE_DEBUG,
1380 "Processing %u bytes of WLAN DATA from peer `%s'\n", 1381 "Processing %u bytes of WLAN DATA from peer `%s'\n",