aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-03-30 11:59:49 +0000
committerChristian Grothoff <christian@grothoff.org>2013-03-30 11:59:49 +0000
commitafef053a2ee08002fe50f3e1842e5c8153e6c507 (patch)
tree8ffc70786908ded09ee74007df75fe33f77d4b72
parent4eb0a75f98349e55a405212404b258a987fb6145 (diff)
downloadgnunet-afef053a2ee08002fe50f3e1842e5c8153e6c507.tar.gz
gnunet-afef053a2ee08002fe50f3e1842e5c8153e6c507.zip
-no longer pass distance information from non-DV plugins
-rw-r--r--src/transport/plugin_transport_http.c12
-rw-r--r--src/transport/plugin_transport_http_client.c18
-rw-r--r--src/transport/plugin_transport_http_server.c20
-rw-r--r--src/transport/plugin_transport_tcp.c16
-rw-r--r--src/transport/plugin_transport_udp.c16
-rw-r--r--src/transport/plugin_transport_udp_broadcasting.c28
-rw-r--r--src/transport/plugin_transport_unix.c14
-rw-r--r--src/transport/plugin_transport_wlan.c30
8 files changed, 66 insertions, 88 deletions
diff --git a/src/transport/plugin_transport_http.c b/src/transport/plugin_transport_http.c
index 24d37cc34..88ab5cfed 100644
--- a/src/transport/plugin_transport_http.c
+++ b/src/transport/plugin_transport_http.c
@@ -188,20 +188,18 @@ http_plugin_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
188 struct Session *s = cls; 188 struct Session *s = cls;
189 struct Plugin *plugin = s->plugin; 189 struct Plugin *plugin = s->plugin;
190 struct GNUNET_TIME_Relative delay; 190 struct GNUNET_TIME_Relative delay;
191 struct GNUNET_ATS_Information atsi[2]; 191 struct GNUNET_ATS_Information atsi;
192 192
193 atsi[0].type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE); 193 atsi.type = htonl (GNUNET_ATS_NETWORK_TYPE);
194 atsi[0].value = htonl (1); 194 atsi.value = session->ats_address_network_type;
195 atsi[1].type = htonl (GNUNET_ATS_NETWORK_TYPE);
196 atsi[1].value = session->ats_address_network_type;
197 GNUNET_break (session->ats_address_network_type != ntohl (GNUNET_ATS_NET_UNSPECIFIED)); 195 GNUNET_break (session->ats_address_network_type != ntohl (GNUNET_ATS_NET_UNSPECIFIED));
198 196
199 reschedule_session_timeout (session); 197 reschedule_session_timeout (session);
200 198
201 delay = 199 delay =
202 plugin->env->receive (plugin->env->cls, &s->target, message, 200 plugin->env->receive (plugin->env->cls, &s->target, message,
203 (const struct GNUNET_ATS_Information *) &atsi, 201 &atsi,
204 2, s, s->addr, s->addrlen); 202 1, s, s->addr, s->addrlen);
205 return delay; 203 return delay;
206} 204}
207 205
diff --git a/src/transport/plugin_transport_http_client.c b/src/transport/plugin_transport_http_client.c
index 062941751..00b704a27 100644
--- a/src/transport/plugin_transport_http_client.c
+++ b/src/transport/plugin_transport_http_client.c
@@ -903,7 +903,7 @@ client_receive_mst_cb (void *cls, void *client,
903 struct Session *s = cls; 903 struct Session *s = cls;
904 struct HTTP_Client_Plugin *plugin; 904 struct HTTP_Client_Plugin *plugin;
905 struct GNUNET_TIME_Relative delay; 905 struct GNUNET_TIME_Relative delay;
906 struct GNUNET_ATS_Information atsi[2]; 906 struct GNUNET_ATS_Information atsi;
907 char *stat_txt; 907 char *stat_txt;
908 if (GNUNET_YES != client_exist_session(p, s)) 908 if (GNUNET_YES != client_exist_session(p, s))
909 { 909 {
@@ -912,21 +912,19 @@ client_receive_mst_cb (void *cls, void *client,
912 } 912 }
913 plugin = s->plugin; 913 plugin = s->plugin;
914 914
915 atsi[0].type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE); 915 atsi.type = htonl (GNUNET_ATS_NETWORK_TYPE);
916 atsi[0].value = htonl (1); 916 atsi.value = s->ats_address_network_type;
917 atsi[1].type = htonl (GNUNET_ATS_NETWORK_TYPE);
918 atsi[1].value = s->ats_address_network_type;
919 GNUNET_break (s->ats_address_network_type != ntohl (GNUNET_ATS_NET_UNSPECIFIED)); 917 GNUNET_break (s->ats_address_network_type != ntohl (GNUNET_ATS_NET_UNSPECIFIED));
920 918
921 delay = s->plugin->env->receive (plugin->env->cls, &s->target, message, 919 delay = s->plugin->env->receive (plugin->env->cls, &s->target, message,
922 s, s->addr, s->addrlen); 920 s, s->addr, s->addrlen);
923 921
924 plugin->env->update_address_metrics (plugin->env->cls, 922 plugin->env->update_address_metrics (plugin->env->cls,
925 &s->target, 923 &s->target,
926 s->addr, 924 s->addr,
927 s->addrlen, 925 s->addrlen,
928 s, 926 s,
929 (struct GNUNET_ATS_Information *) &atsi, 2); 927 &atsi, 1);
930 928
931 GNUNET_asprintf (&stat_txt, "# bytes received via %s_client", plugin->protocol); 929 GNUNET_asprintf (&stat_txt, "# bytes received via %s_client", plugin->protocol);
932 GNUNET_STATISTICS_update (plugin->env->stats, 930 GNUNET_STATISTICS_update (plugin->env->stats,
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c
index ba07ee95e..fb6181a6b 100644
--- a/src/transport/plugin_transport_http_server.c
+++ b/src/transport/plugin_transport_http_server.c
@@ -1269,7 +1269,8 @@ server_receive_mst_cb (void *cls, void *client,
1269 const struct GNUNET_MessageHeader *message) 1269 const struct GNUNET_MessageHeader *message)
1270{ 1270{
1271 struct Session *s = cls; 1271 struct Session *s = cls;
1272 struct GNUNET_ATS_Information atsi[2]; 1272 struct HTTP_Server_Plugin *plugin = s->plugin;
1273 struct GNUNET_ATS_Information atsi;
1273 struct GNUNET_TIME_Relative delay; 1274 struct GNUNET_TIME_Relative delay;
1274 char *stat_txt; 1275 char *stat_txt;
1275 1276
@@ -1277,12 +1278,9 @@ server_receive_mst_cb (void *cls, void *client,
1277 if (GNUNET_NO == server_exist_session(p, s)) 1278 if (GNUNET_NO == server_exist_session(p, s))
1278 return GNUNET_OK; 1279 return GNUNET_OK;
1279 1280
1280 struct HTTP_Server_Plugin *plugin = s->plugin;
1281 1281
1282 atsi[0].type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE); 1282 atsi.type = htonl (GNUNET_ATS_NETWORK_TYPE);
1283 atsi[0].value = htonl (1); 1283 atsi.value = s->ats_address_network_type;
1284 atsi[1].type = htonl (GNUNET_ATS_NETWORK_TYPE);
1285 atsi[1].value = s->ats_address_network_type;
1286 GNUNET_break (s->ats_address_network_type != ntohl (GNUNET_ATS_NET_UNSPECIFIED)); 1284 GNUNET_break (s->ats_address_network_type != ntohl (GNUNET_ATS_NET_UNSPECIFIED));
1287 1285
1288 1286
@@ -1292,11 +1290,11 @@ server_receive_mst_cb (void *cls, void *client,
1292 s, s->addr, s->addrlen); 1290 s, s->addr, s->addrlen);
1293 1291
1294 plugin->env->update_address_metrics (plugin->env->cls, 1292 plugin->env->update_address_metrics (plugin->env->cls,
1295 &s->target, 1293 &s->target,
1296 s->addr, 1294 s->addr,
1297 s->addrlen, 1295 s->addrlen,
1298 s, 1296 s,
1299 (struct GNUNET_ATS_Information *) &atsi, 2); 1297 &atsi, 1);
1300 1298
1301 GNUNET_asprintf (&stat_txt, "# bytes received via %s_server", plugin->protocol); 1299 GNUNET_asprintf (&stat_txt, "# bytes received via %s_server", plugin->protocol);
1302 GNUNET_STATISTICS_update (plugin->env->stats, 1300 GNUNET_STATISTICS_update (plugin->env->stats,
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c
index 856ec6eaf..08fe21573 100644
--- a/src/transport/plugin_transport_tcp.c
+++ b/src/transport/plugin_transport_tcp.c
@@ -2035,12 +2035,10 @@ handle_tcp_data (void *cls, struct GNUNET_SERVER_Client *client,
2035 GNUNET_STATISTICS_update (plugin->env->stats, 2035 GNUNET_STATISTICS_update (plugin->env->stats,
2036 gettext_noop ("# bytes received via TCP"), 2036 gettext_noop ("# bytes received via TCP"),
2037 ntohs (message->size), GNUNET_NO); 2037 ntohs (message->size), GNUNET_NO);
2038 struct GNUNET_ATS_Information distance[2]; 2038 struct GNUNET_ATS_Information distance;
2039 2039
2040 distance[0].type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE); 2040 distance.type = htonl (GNUNET_ATS_NETWORK_TYPE);
2041 distance[0].value = htonl (1); 2041 distance.value = session->ats_address_network_type;
2042 distance[1].type = htonl (GNUNET_ATS_NETWORK_TYPE);
2043 distance[1].value = session->ats_address_network_type;
2044 GNUNET_break (ntohl(session->ats_address_network_type) != GNUNET_ATS_NET_UNSPECIFIED); 2042 GNUNET_break (ntohl(session->ats_address_network_type) != GNUNET_ATS_NET_UNSPECIFIED);
2045 2043
2046 GNUNET_assert (GNUNET_CONTAINER_multihashmap_contains_value (plugin->sessionmap, 2044 GNUNET_assert (GNUNET_CONTAINER_multihashmap_contains_value (plugin->sessionmap,
@@ -2056,10 +2054,10 @@ handle_tcp_data (void *cls, struct GNUNET_SERVER_Client *client,
2056 plugin->env->update_address_metrics (plugin->env->cls, 2054 plugin->env->update_address_metrics (plugin->env->cls,
2057 &session->target, 2055 &session->target,
2058 (GNUNET_YES == session->inbound) ? NULL : session->addr, 2056 (GNUNET_YES == session->inbound) ? NULL : session->addr,
2059 (GNUNET_YES == session->inbound) ? 0 : session->addrlen, 2057 (GNUNET_YES == session->inbound) ? 0 : session->addrlen,
2060 session, 2058 session,
2061 (struct GNUNET_ATS_Information *) &distance, 2059 &distance,
2062 2); 2060 1);
2063 2061
2064 reschedule_session_timeout (session); 2062 reschedule_session_timeout (session);
2065 2063
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c
index 885a26b19..228c60d33 100644
--- a/src/transport/plugin_transport_udp.c
+++ b/src/transport/plugin_transport_udp.c
@@ -1893,17 +1893,13 @@ process_inbound_tokenized_messages (void *cls, void *client,
1893{ 1893{
1894 struct Plugin *plugin = cls; 1894 struct Plugin *plugin = cls;
1895 struct SourceInformation *si = client; 1895 struct SourceInformation *si = client;
1896 struct GNUNET_ATS_Information ats[2];
1897 struct GNUNET_TIME_Relative delay; 1896 struct GNUNET_TIME_Relative delay;
1898 1897
1899 GNUNET_assert (si->session != NULL); 1898 GNUNET_assert (si->session != NULL);
1900 if (GNUNET_YES == si->session->in_destroy) 1899 if (GNUNET_YES == si->session->in_destroy)
1901 return GNUNET_OK; 1900 return GNUNET_OK;
1902 /* setup ATS */ 1901 /* setup ATS */
1903 ats[0].type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE); 1902 GNUNET_break (ntohl(si->session->ats.value) != GNUNET_ATS_NET_UNSPECIFIED);
1904 ats[0].value = htonl (1);
1905 ats[1] = si->session->ats;
1906 GNUNET_break (ntohl(ats[1].value) != GNUNET_ATS_NET_UNSPECIFIED);
1907 delay = plugin->env->receive (plugin->env->cls, 1903 delay = plugin->env->receive (plugin->env->cls,
1908 &si->sender, 1904 &si->sender,
1909 hdr, 1905 hdr,
@@ -1912,11 +1908,11 @@ process_inbound_tokenized_messages (void *cls, void *client,
1912 si->args); 1908 si->args);
1913 1909
1914 plugin->env->update_address_metrics (plugin->env->cls, 1910 plugin->env->update_address_metrics (plugin->env->cls,
1915 &si->sender, 1911 &si->sender,
1916 si->arg, 1912 si->arg,
1917 si->args, 1913 si->args,
1918 si->session, 1914 si->session,
1919 (struct GNUNET_ATS_Information *) &ats, 2); 1915 &si->session->ats, 1);
1920 1916
1921 si->session->flow_delay_for_other_peer = delay; 1917 si->session->flow_delay_for_other_peer = delay;
1922 reschedule_session_timeout(si->session); 1918 reschedule_session_timeout(si->session);
diff --git a/src/transport/plugin_transport_udp_broadcasting.c b/src/transport/plugin_transport_udp_broadcasting.c
index 102e262ae..838aec5bc 100644
--- a/src/transport/plugin_transport_udp_broadcasting.c
+++ b/src/transport/plugin_transport_udp_broadcasting.c
@@ -89,7 +89,6 @@ struct Mstv6Context
89}; 89};
90 90
91 91
92
93int 92int
94broadcast_ipv6_mst_cb (void *cls, void *client, 93broadcast_ipv6_mst_cb (void *cls, void *client,
95 const struct GNUNET_MessageHeader *message) 94 const struct GNUNET_MessageHeader *message)
@@ -98,9 +97,10 @@ broadcast_ipv6_mst_cb (void *cls, void *client,
98 struct Plugin *plugin = cls; 97 struct Plugin *plugin = cls;
99 struct Mstv6Context *mc = client; 98 struct Mstv6Context *mc = client;
100 const struct GNUNET_MessageHeader *hello; 99 const struct GNUNET_MessageHeader *hello;
101 struct UDP_Beacon_Message *msg; 100 const struct UDP_Beacon_Message *msg;
101 struct GNUNET_ATS_Information atsi;
102 102
103 msg = (struct UDP_Beacon_Message *) message; 103 msg = (const struct UDP_Beacon_Message *) message;
104 104
105 if (GNUNET_MESSAGE_TYPE_TRANSPORT_BROADCAST_BEACON != 105 if (GNUNET_MESSAGE_TYPE_TRANSPORT_BROADCAST_BEACON !=
106 ntohs (msg->header.type)) 106 ntohs (msg->header.type))
@@ -109,28 +109,25 @@ broadcast_ipv6_mst_cb (void *cls, void *client,
109 "Received beacon with %u bytes from peer `%s' via address `%s'\n", 109 "Received beacon with %u bytes from peer `%s' via address `%s'\n",
110 ntohs (msg->header.size), GNUNET_i2s (&msg->sender), 110 ntohs (msg->header.size), GNUNET_i2s (&msg->sender),
111 udp_address_to_string (NULL, &mc->addr, sizeof (mc->addr))); 111 udp_address_to_string (NULL, &mc->addr, sizeof (mc->addr)));
112 struct GNUNET_ATS_Information atsi[2];
113 112
114 /* setup ATS */ 113 /* setup ATS */
115 atsi[0].type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE); 114 atsi.type = htonl (GNUNET_ATS_NETWORK_TYPE);
116 atsi[0].value = htonl (1); 115 atsi.value = mc->ats_address_network_type;
117 atsi[1].type = htonl (GNUNET_ATS_NETWORK_TYPE);
118 atsi[1].value = mc->ats_address_network_type;
119 GNUNET_break (ntohl(mc->ats_address_network_type) != GNUNET_ATS_NET_UNSPECIFIED); 116 GNUNET_break (ntohl(mc->ats_address_network_type) != GNUNET_ATS_NET_UNSPECIFIED);
120 117
121 hello = (struct GNUNET_MessageHeader *) &msg[1]; 118 hello = (struct GNUNET_MessageHeader *) &msg[1];
122 plugin->env->receive (plugin->env->cls, 119 plugin->env->receive (plugin->env->cls,
123 &msg->sender, 120 &msg->sender,
124 hello, 121 hello,
125 NULL, 122 NULL,
126 (const char *) &mc->addr, 123 (const char *) &mc->addr,
127 sizeof (mc->addr)); 124 sizeof (mc->addr));
128 plugin->env->update_address_metrics (plugin->env->cls, 125 plugin->env->update_address_metrics (plugin->env->cls,
129 &msg->sender, 126 &msg->sender,
130 (const char *) &mc->addr, 127 (const char *) &mc->addr,
131 sizeof (mc->addr), 128 sizeof (mc->addr),
132 NULL, 129 NULL,
133 (struct GNUNET_ATS_Information *) &atsi, 2); 130 &atsi, 1);
134 131
135 GNUNET_STATISTICS_update (plugin->env->stats, 132 GNUNET_STATISTICS_update (plugin->env->stats,
136 _ 133 _
@@ -140,6 +137,7 @@ broadcast_ipv6_mst_cb (void *cls, void *client,
140 return GNUNET_OK; 137 return GNUNET_OK;
141} 138}
142 139
140
143int 141int
144broadcast_ipv4_mst_cb (void *cls, void *client, 142broadcast_ipv4_mst_cb (void *cls, void *client,
145 const struct GNUNET_MessageHeader *message) 143 const struct GNUNET_MessageHeader *message)
diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c
index e5b591bc4..a27144efa 100644
--- a/src/transport/plugin_transport_unix.c
+++ b/src/transport/plugin_transport_unix.c
@@ -796,13 +796,9 @@ unix_demultiplexer (struct Plugin *plugin, struct GNUNET_PeerIdentity *sender,
796 const struct GNUNET_MessageHeader *currhdr, 796 const struct GNUNET_MessageHeader *currhdr,
797 const struct sockaddr_un *un, size_t fromlen) 797 const struct sockaddr_un *un, size_t fromlen)
798{ 798{
799 struct GNUNET_ATS_Information ats[2];
800 struct Session *s = NULL; 799 struct Session *s = NULL;
801 struct GNUNET_HELLO_Address * addr; 800 struct GNUNET_HELLO_Address * addr;
802 801
803 ats[0].type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE);
804 ats[0].value = htonl (UNIX_DIRECT_DISTANCE);
805 ats[1] = plugin->ats_network;
806 GNUNET_break (ntohl(plugin->ats_network.value) != GNUNET_ATS_NET_UNSPECIFIED); 802 GNUNET_break (ntohl(plugin->ats_network.value) != GNUNET_ATS_NET_UNSPECIFIED);
807 803
808 GNUNET_assert (fromlen >= sizeof (struct sockaddr_un)); 804 GNUNET_assert (fromlen >= sizeof (struct sockaddr_un));
@@ -826,11 +822,11 @@ unix_demultiplexer (struct Plugin *plugin, struct GNUNET_PeerIdentity *sender,
826 s, un->sun_path, strlen (un->sun_path) + 1); 822 s, un->sun_path, strlen (un->sun_path) + 1);
827 823
828 plugin->env->update_address_metrics (plugin->env->cls, 824 plugin->env->update_address_metrics (plugin->env->cls,
829 sender, 825 sender,
830 un->sun_path, 826 un->sun_path,
831 strlen (un->sun_path) + 1, 827 strlen (un->sun_path) + 1,
832 s, 828 s,
833 (struct GNUNET_ATS_Information *) &ats, 2); 829 &plugin->ats_network, 1);
834 830
835 GNUNET_free (addr); 831 GNUNET_free (addr);
836} 832}
diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c
index ecf1efb86..eb635615f 100644
--- a/src/transport/plugin_transport_wlan.c
+++ b/src/transport/plugin_transport_wlan.c
@@ -1132,18 +1132,15 @@ process_data (void *cls, void *client, const struct GNUNET_MessageHeader *hdr)
1132 struct Plugin *plugin = cls; 1132 struct Plugin *plugin = cls;
1133 struct MacAndSession *mas = client; 1133 struct MacAndSession *mas = client;
1134 struct MacAndSession xmas; 1134 struct MacAndSession xmas;
1135#define NUM_ATS 2 1135 struct GNUNET_ATS_Information ats;
1136 struct GNUNET_ATS_Information ats[NUM_ATS]; /* FIXME: do better here */
1137 struct FragmentMessage *fm; 1136 struct FragmentMessage *fm;
1138 struct GNUNET_PeerIdentity tmpsource; 1137 struct GNUNET_PeerIdentity tmpsource;
1139 const struct WlanHeader *wlanheader; 1138 const struct WlanHeader *wlanheader;
1140 int ret; 1139 int ret;
1141 uint16_t msize; 1140 uint16_t msize;
1142 1141
1143 ats[0].type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE); 1142 ats.type = htonl (GNUNET_ATS_NETWORK_TYPE);
1144 ats[0].value = htonl (1); 1143 ats.value = htonl (GNUNET_ATS_NET_WLAN);
1145 ats[1].type = htonl (GNUNET_ATS_NETWORK_TYPE);
1146 ats[1].value = htonl (GNUNET_ATS_NET_WLAN);
1147 msize = ntohs (hdr->size); 1144 msize = ntohs (hdr->size);
1148 1145
1149 GNUNET_STATISTICS_update (plugin->env->stats, 1146 GNUNET_STATISTICS_update (plugin->env->stats,
@@ -1176,11 +1173,11 @@ process_data (void *cls, void *client, const struct GNUNET_MessageHeader *hdr)
1176 (mas->endpoint == NULL) ? NULL : (const char *) &mas->endpoint->addr, 1173 (mas->endpoint == NULL) ? NULL : (const char *) &mas->endpoint->addr,
1177 (mas->endpoint == NULL) ? 0 : sizeof (struct GNUNET_TRANSPORT_WLAN_MacAddress)); 1174 (mas->endpoint == NULL) ? 0 : sizeof (struct GNUNET_TRANSPORT_WLAN_MacAddress));
1178 plugin->env->update_address_metrics (plugin->env->cls, 1175 plugin->env->update_address_metrics (plugin->env->cls,
1179 &tmpsource, 1176 &tmpsource,
1180 (mas->endpoint == NULL) ? NULL : (const char *) &mas->endpoint->addr, 1177 (mas->endpoint == NULL) ? NULL : (const char *) &mas->endpoint->addr,
1181 (mas->endpoint == NULL) ? 0 : sizeof (struct GNUNET_TRANSPORT_WLAN_MacAddress), 1178 (mas->endpoint == NULL) ? 0 : sizeof (struct GNUNET_TRANSPORT_WLAN_MacAddress),
1182 mas->session, 1179 mas->session,
1183 (struct GNUNET_ATS_Information *) &ats, NUM_ATS); 1180 &ats, 1);
1184 break; 1181 break;
1185 case GNUNET_MESSAGE_TYPE_FRAGMENT: 1182 case GNUNET_MESSAGE_TYPE_FRAGMENT:
1186 if (NULL == mas->endpoint) 1183 if (NULL == mas->endpoint)
@@ -1299,16 +1296,15 @@ process_data (void *cls, void *client, const struct GNUNET_MessageHeader *hdr)
1299 (mas->endpoint == NULL) ? NULL : (const char *) &mas->endpoint->addr, 1296 (mas->endpoint == NULL) ? NULL : (const char *) &mas->endpoint->addr,
1300 (mas->endpoint == NULL) ? 0 : sizeof (struct GNUNET_TRANSPORT_WLAN_MacAddress)); 1297 (mas->endpoint == NULL) ? 0 : sizeof (struct GNUNET_TRANSPORT_WLAN_MacAddress));
1301 plugin->env->update_address_metrics (plugin->env->cls, 1298 plugin->env->update_address_metrics (plugin->env->cls,
1302 &mas->session->target, 1299 &mas->session->target,
1303 (mas->endpoint == NULL) ? NULL : (const char *) &mas->endpoint->addr, 1300 (mas->endpoint == NULL) ? NULL : (const char *) &mas->endpoint->addr,
1304 (mas->endpoint == NULL) ? 0 : sizeof (struct GNUNET_TRANSPORT_WLAN_MacAddress), 1301 (mas->endpoint == NULL) ? 0 : sizeof (struct GNUNET_TRANSPORT_WLAN_MacAddress),
1305 mas->session, 1302 mas->session,
1306 (struct GNUNET_ATS_Information *) &ats, NUM_ATS); 1303 &ats, 1);
1307 break; 1304 break;
1308 } 1305 }
1309 return GNUNET_OK; 1306 return GNUNET_OK;
1310} 1307}
1311#undef NUM_ATS
1312 1308
1313 1309
1314/** 1310/**