aboutsummaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/gnunet-helper-transport-wlan-dummy.c6
-rw-r--r--src/transport/gnunet-service-transport.c2
-rw-r--r--src/transport/plugin_transport_http_client.c5
-rw-r--r--src/transport/plugin_transport_http_server.c5
-rw-r--r--src/transport/plugin_transport_udp.c5
-rw-r--r--src/transport/plugin_transport_udp_broadcasting.c10
-rw-r--r--src/transport/plugin_transport_wlan.c6
7 files changed, 24 insertions, 15 deletions
diff --git a/src/transport/gnunet-helper-transport-wlan-dummy.c b/src/transport/gnunet-helper-transport-wlan-dummy.c
index 9d82fccf3..a7015ac2c 100644
--- a/src/transport/gnunet-helper-transport-wlan-dummy.c
+++ b/src/transport/gnunet-helper-transport-wlan-dummy.c
@@ -119,7 +119,7 @@ send_mac_to_plugin (char *buffer, struct GNUNET_TRANSPORT_WLAN_MacAddress *mac)
119 * @param client unused 119 * @param client unused
120 * @param hdr inbound message from the FIFO 120 * @param hdr inbound message from the FIFO
121 */ 121 */
122static void 122static int
123stdin_send (void *cls, void *client, const struct GNUNET_MessageHeader *hdr) 123stdin_send (void *cls, void *client, const struct GNUNET_MessageHeader *hdr)
124{ 124{
125 struct SendBuffer *write_pout = cls; 125 struct SendBuffer *write_pout = cls;
@@ -154,6 +154,7 @@ stdin_send (void *cls, void *client, const struct GNUNET_MessageHeader *hdr)
154 &in[1], 154 &in[1],
155 payload_size); 155 payload_size);
156 write_pout->size += payload_size; 156 write_pout->size += payload_size;
157 return GNUNET_OK;
157} 158}
158 159
159 160
@@ -164,7 +165,7 @@ stdin_send (void *cls, void *client, const struct GNUNET_MessageHeader *hdr)
164 * @param client unused 165 * @param client unused
165 * @param hdr the message we received to copy to the buffer 166 * @param hdr the message we received to copy to the buffer
166 */ 167 */
167static void 168static int
168file_in_send (void *cls, void *client, const struct GNUNET_MessageHeader *hdr) 169file_in_send (void *cls, void *client, const struct GNUNET_MessageHeader *hdr)
169{ 170{
170 struct SendBuffer *write_std = cls; 171 struct SendBuffer *write_std = cls;
@@ -178,6 +179,7 @@ file_in_send (void *cls, void *client, const struct GNUNET_MessageHeader *hdr)
178 } 179 }
179 memcpy (write_std->buf + write_std->size, hdr, sendsize); 180 memcpy (write_std->buf + write_std->size, hdr, sendsize);
180 write_std->size += sendsize; 181 write_std->size += sendsize;
182 return GNUNET_OK;
181} 183}
182 184
183 185
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c
index 93fd0d685..9a1d86ffe 100644
--- a/src/transport/gnunet-service-transport.c
+++ b/src/transport/gnunet-service-transport.c
@@ -230,7 +230,7 @@ plugin_env_receive_callback (void *cls, const struct GNUNET_PeerIdentity *peer,
230 if (NULL == message) 230 if (NULL == message)
231 goto end; 231 goto end;
232 type = ntohs (message->type); 232 type = ntohs (message->type);
233 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received Message with type %u from peer `%s'\n", type, GNUNET_i2s (peer)); 233 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Received Message with type %u from peer `%s'\n", type, GNUNET_i2s (peer));
234 234
235 GNUNET_STATISTICS_update (GST_stats, 235 GNUNET_STATISTICS_update (GST_stats,
236 gettext_noop 236 gettext_noop
diff --git a/src/transport/plugin_transport_http_client.c b/src/transport/plugin_transport_http_client.c
index cf21a425a..79f70bb6c 100644
--- a/src/transport/plugin_transport_http_client.c
+++ b/src/transport/plugin_transport_http_client.c
@@ -333,7 +333,7 @@ client_disconnect (struct Session *s)
333 return res; 333 return res;
334} 334}
335 335
336static void 336static int
337client_receive_mst_cb (void *cls, void *client, 337client_receive_mst_cb (void *cls, void *client,
338 const struct GNUNET_MessageHeader *message) 338 const struct GNUNET_MessageHeader *message)
339{ 339{
@@ -343,7 +343,7 @@ client_receive_mst_cb (void *cls, void *client,
343 if (GNUNET_YES != exist_session(p, s)) 343 if (GNUNET_YES != exist_session(p, s))
344 { 344 {
345 GNUNET_break (0); 345 GNUNET_break (0);
346 return; 346 return GNUNET_OK;
347 } 347 }
348 348
349 delay = http_plugin_receive (s, &s->target, message, s, s->addr, s->addrlen); 349 delay = http_plugin_receive (s, &s->target, message, s, s->addr, s->addrlen);
@@ -359,6 +359,7 @@ client_receive_mst_cb (void *cls, void *client,
359 GNUNET_i2s (&s->target), GNUNET_a2s (s->addr, s->addrlen), 359 GNUNET_i2s (&s->target), GNUNET_a2s (s->addr, s->addrlen),
360 delay); 360 delay);
361 } 361 }
362 return GNUNET_OK;
362} 363}
363 364
364static void 365static void
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c
index 00ad005bd..c49e4953a 100644
--- a/src/transport/plugin_transport_http_server.c
+++ b/src/transport/plugin_transport_http_server.c
@@ -273,7 +273,7 @@ server_reschedule (struct Plugin *plugin, struct MHD_Daemon *server, int now)
273 * @param client clien 273 * @param client clien
274 * @param message the message to be forwarded to transport service 274 * @param message the message to be forwarded to transport service
275 */ 275 */
276static void 276static int
277server_receive_mst_cb (void *cls, void *client, 277server_receive_mst_cb (void *cls, void *client,
278 const struct GNUNET_MessageHeader *message) 278 const struct GNUNET_MessageHeader *message)
279{ 279{
@@ -281,7 +281,7 @@ server_receive_mst_cb (void *cls, void *client,
281 281
282 GNUNET_assert (NULL != p); 282 GNUNET_assert (NULL != p);
283 if (GNUNET_NO == exist_session(p, s)) 283 if (GNUNET_NO == exist_session(p, s))
284 return; 284 return GNUNET_OK;
285 285
286 struct Plugin *plugin = s->plugin; 286 struct Plugin *plugin = s->plugin;
287 struct GNUNET_TIME_Relative delay; 287 struct GNUNET_TIME_Relative delay;
@@ -299,6 +299,7 @@ server_receive_mst_cb (void *cls, void *client,
299 http_plugin_address_to_string (NULL, s->addr, s->addrlen), 299 http_plugin_address_to_string (NULL, s->addr, s->addrlen),
300 delay); 300 delay);
301 } 301 }
302 return GNUNET_OK;
302} 303}
303 304
304/** 305/**
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c
index 86af69fc8..60814327c 100644
--- a/src/transport/plugin_transport_udp.c
+++ b/src/transport/plugin_transport_udp.c
@@ -1263,7 +1263,7 @@ udp_nat_port_map_callback (void *cls, int add_remove,
1263 * @param client the 'struct SourceInformation' 1263 * @param client the 'struct SourceInformation'
1264 * @param hdr the actual message 1264 * @param hdr the actual message
1265 */ 1265 */
1266static void 1266static int
1267process_inbound_tokenized_messages (void *cls, void *client, 1267process_inbound_tokenized_messages (void *cls, void *client,
1268 const struct GNUNET_MessageHeader *hdr) 1268 const struct GNUNET_MessageHeader *hdr)
1269{ 1269{
@@ -1274,7 +1274,7 @@ process_inbound_tokenized_messages (void *cls, void *client,
1274 1274
1275 GNUNET_assert (si->session != NULL); 1275 GNUNET_assert (si->session != NULL);
1276 if (GNUNET_YES == si->session->in_destroy) 1276 if (GNUNET_YES == si->session->in_destroy)
1277 return; 1277 return GNUNET_OK;
1278 /* setup ATS */ 1278 /* setup ATS */
1279 ats[0].type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE); 1279 ats[0].type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE);
1280 ats[0].value = htonl (1); 1280 ats[0].value = htonl (1);
@@ -1289,6 +1289,7 @@ process_inbound_tokenized_messages (void *cls, void *client,
1289 si->arg, 1289 si->arg,
1290 si->args); 1290 si->args);
1291 si->session->flow_delay_for_other_peer = delay; 1291 si->session->flow_delay_for_other_peer = delay;
1292 return GNUNET_OK;
1292} 1293}
1293 1294
1294 1295
diff --git a/src/transport/plugin_transport_udp_broadcasting.c b/src/transport/plugin_transport_udp_broadcasting.c
index 2935d8da3..baabf45ea 100644
--- a/src/transport/plugin_transport_udp_broadcasting.c
+++ b/src/transport/plugin_transport_udp_broadcasting.c
@@ -90,7 +90,7 @@ struct Mstv6Context
90 90
91 91
92 92
93void 93int
94broadcast_ipv6_mst_cb (void *cls, void *client, 94broadcast_ipv6_mst_cb (void *cls, void *client,
95 const struct GNUNET_MessageHeader *message) 95 const struct GNUNET_MessageHeader *message)
96{ 96{
@@ -104,7 +104,7 @@ broadcast_ipv6_mst_cb (void *cls, void *client,
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))
107 return; 107 return GNUNET_OK;
108 LOG (GNUNET_ERROR_TYPE_DEBUG, 108 LOG (GNUNET_ERROR_TYPE_DEBUG,
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),
@@ -128,9 +128,10 @@ broadcast_ipv6_mst_cb (void *cls, void *client,
128 ("# IPv6 multicast HELLO beacons received via udp"), 128 ("# IPv6 multicast HELLO beacons received via udp"),
129 1, GNUNET_NO); 129 1, GNUNET_NO);
130 GNUNET_free (mc); 130 GNUNET_free (mc);
131 return GNUNET_OK;
131} 132}
132 133
133void 134int
134broadcast_ipv4_mst_cb (void *cls, void *client, 135broadcast_ipv4_mst_cb (void *cls, void *client,
135 const struct GNUNET_MessageHeader *message) 136 const struct GNUNET_MessageHeader *message)
136{ 137{
@@ -143,7 +144,7 @@ broadcast_ipv4_mst_cb (void *cls, void *client,
143 144
144 if (GNUNET_MESSAGE_TYPE_TRANSPORT_BROADCAST_BEACON != 145 if (GNUNET_MESSAGE_TYPE_TRANSPORT_BROADCAST_BEACON !=
145 ntohs (msg->header.type)) 146 ntohs (msg->header.type))
146 return; 147 return GNUNET_OK;
147 LOG (GNUNET_ERROR_TYPE_DEBUG, 148 LOG (GNUNET_ERROR_TYPE_DEBUG,
148 "Received beacon with %u bytes from peer `%s' via address `%s'\n", 149 "Received beacon with %u bytes from peer `%s' via address `%s'\n",
149 ntohs (msg->header.size), GNUNET_i2s (&msg->sender), 150 ntohs (msg->header.size), GNUNET_i2s (&msg->sender),
@@ -168,6 +169,7 @@ broadcast_ipv4_mst_cb (void *cls, void *client,
168 ("# IPv4 broadcast HELLO beacons received via udp"), 169 ("# IPv4 broadcast HELLO beacons received via udp"),
169 1, GNUNET_NO); 170 1, GNUNET_NO);
170 GNUNET_free (mc); 171 GNUNET_free (mc);
172 return GNUNET_OK;
171} 173}
172 174
173void 175void
diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c
index bda17cb90..aed4b2286 100644
--- a/src/transport/plugin_transport_wlan.c
+++ b/src/transport/plugin_transport_wlan.c
@@ -1081,7 +1081,7 @@ wlan_plugin_send (void *cls,
1081 * @param client pointer to the session this message belongs to 1081 * @param client pointer to the session this message belongs to
1082 * @param hdr start of the message 1082 * @param hdr start of the message
1083 */ 1083 */
1084static void 1084static int
1085process_data (void *cls, void *client, const struct GNUNET_MessageHeader *hdr) 1085process_data (void *cls, void *client, const struct GNUNET_MessageHeader *hdr)
1086{ 1086{
1087 struct Plugin *plugin = cls; 1087 struct Plugin *plugin = cls;
@@ -1245,6 +1245,7 @@ process_data (void *cls, void *client, const struct GNUNET_MessageHeader *hdr)
1245 (mas->endpoint == NULL) ? 0 : sizeof (struct GNUNET_TRANSPORT_WLAN_MacAddress)); 1245 (mas->endpoint == NULL) ? 0 : sizeof (struct GNUNET_TRANSPORT_WLAN_MacAddress));
1246 break; 1246 break;
1247 } 1247 }
1248 return GNUNET_OK;
1248} 1249}
1249#undef NUM_ATS 1250#undef NUM_ATS
1250 1251
@@ -1256,7 +1257,7 @@ process_data (void *cls, void *client, const struct GNUNET_MessageHeader *hdr)
1256 * @param client client that send the data (not used) 1257 * @param client client that send the data (not used)
1257 * @param hdr header of the GNUNET_MessageHeader 1258 * @param hdr header of the GNUNET_MessageHeader
1258 */ 1259 */
1259static void 1260static int
1260handle_helper_message (void *cls, void *client, 1261handle_helper_message (void *cls, void *client,
1261 const struct GNUNET_MessageHeader *hdr) 1262 const struct GNUNET_MessageHeader *hdr)
1262{ 1263{
@@ -1358,6 +1359,7 @@ handle_helper_message (void *cls, void *client,
1358 ntohs (hdr->type), ntohs (hdr->size)); 1359 ntohs (hdr->type), ntohs (hdr->size));
1359 break; 1360 break;
1360 } 1361 }
1362 return GNUNET_OK;
1361} 1363}
1362 1364
1363 1365