diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2013-03-18 16:10:31 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2013-03-18 16:10:31 +0000 |
commit | 6cc556bed0898dcdb168248658574862920818da (patch) | |
tree | 1e4850a7756e0940142ff2009e0fabab1c7660bd /src/transport/plugin_transport_wlan.c | |
parent | 2bfa211933d6285ffbdc7d871e695838b5d08b9f (diff) | |
download | gnunet-6cc556bed0898dcdb168248658574862920818da.tar.gz gnunet-6cc556bed0898dcdb168248658574862920818da.zip |
transport plugin api change: split of address receive and ats updates
Diffstat (limited to 'src/transport/plugin_transport_wlan.c')
-rw-r--r-- | src/transport/plugin_transport_wlan.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c index 5fed7a739..e1201eb2b 100644 --- a/src/transport/plugin_transport_wlan.c +++ b/src/transport/plugin_transport_wlan.c | |||
@@ -1171,10 +1171,15 @@ process_data (void *cls, void *client, const struct GNUNET_MessageHeader *hdr) | |||
1171 | plugin->env->receive (plugin->env->cls, | 1171 | plugin->env->receive (plugin->env->cls, |
1172 | &tmpsource, | 1172 | &tmpsource, |
1173 | hdr, | 1173 | hdr, |
1174 | ats, NUM_ATS, | ||
1175 | mas->session, | 1174 | mas->session, |
1176 | (mas->endpoint == NULL) ? NULL : (const char *) &mas->endpoint->addr, | 1175 | (mas->endpoint == NULL) ? NULL : (const char *) &mas->endpoint->addr, |
1177 | (mas->endpoint == NULL) ? 0 : sizeof (struct GNUNET_TRANSPORT_WLAN_MacAddress)); | 1176 | (mas->endpoint == NULL) ? 0 : sizeof (struct GNUNET_TRANSPORT_WLAN_MacAddress)); |
1177 | plugin->env->update_address_metrics (plugin->env->cls, | ||
1178 | &tmpsource, | ||
1179 | (mas->endpoint == NULL) ? NULL : (const char *) &mas->endpoint->addr, | ||
1180 | (mas->endpoint == NULL) ? 0 : sizeof (struct GNUNET_TRANSPORT_WLAN_MacAddress), | ||
1181 | mas->session, | ||
1182 | (struct GNUNET_ATS_Information *) &ats, NUM_ATS); | ||
1178 | break; | 1183 | break; |
1179 | case GNUNET_MESSAGE_TYPE_FRAGMENT: | 1184 | case GNUNET_MESSAGE_TYPE_FRAGMENT: |
1180 | if (NULL == mas->endpoint) | 1185 | if (NULL == mas->endpoint) |
@@ -1289,10 +1294,15 @@ process_data (void *cls, void *client, const struct GNUNET_MessageHeader *hdr) | |||
1289 | plugin->env->receive (plugin->env->cls, | 1294 | plugin->env->receive (plugin->env->cls, |
1290 | &mas->session->target, | 1295 | &mas->session->target, |
1291 | hdr, | 1296 | hdr, |
1292 | ats, NUM_ATS, | ||
1293 | mas->session, | 1297 | mas->session, |
1294 | (mas->endpoint == NULL) ? NULL : (const char *) &mas->endpoint->addr, | 1298 | (mas->endpoint == NULL) ? NULL : (const char *) &mas->endpoint->addr, |
1295 | (mas->endpoint == NULL) ? 0 : sizeof (struct GNUNET_TRANSPORT_WLAN_MacAddress)); | 1299 | (mas->endpoint == NULL) ? 0 : sizeof (struct GNUNET_TRANSPORT_WLAN_MacAddress)); |
1300 | plugin->env->update_address_metrics (plugin->env->cls, | ||
1301 | &mas->session->target, | ||
1302 | (mas->endpoint == NULL) ? NULL : (const char *) &mas->endpoint->addr, | ||
1303 | (mas->endpoint == NULL) ? 0 : sizeof (struct GNUNET_TRANSPORT_WLAN_MacAddress), | ||
1304 | mas->session, | ||
1305 | (struct GNUNET_ATS_Information *) &ats, NUM_ATS); | ||
1296 | break; | 1306 | break; |
1297 | } | 1307 | } |
1298 | return GNUNET_OK; | 1308 | return GNUNET_OK; |