diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-04-13 14:12:00 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-04-13 14:12:00 +0000 |
commit | d0f14ce4076688b90da1a88db984043eceda0566 (patch) | |
tree | 36a180c6ae4260f4d4f6e6b84353ebe3d01ca48e /src/transport/plugin_transport_udp.c | |
parent | 6ba13deb812b0b55ae5c34de044ad4bf6cb7835d (diff) | |
download | gnunet-d0f14ce4076688b90da1a88db984043eceda0566.tar.gz gnunet-d0f14ce4076688b90da1a88db984043eceda0566.zip |
transport API changes in preparation for the storm
Diffstat (limited to 'src/transport/plugin_transport_udp.c')
-rw-r--r-- | src/transport/plugin_transport_udp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index bdec32490..3e59f89dc 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c | |||
@@ -184,6 +184,7 @@ udp_transport_server_stop (void *cls) | |||
184 | * @param msgbuf_size the size of the msgbuf to send | 184 | * @param msgbuf_size the size of the msgbuf to send |
185 | * @param priority how important is the message (ignored by UDP) | 185 | * @param priority how important is the message (ignored by UDP) |
186 | * @param timeout when should we time out (give up) if we can not transmit? | 186 | * @param timeout when should we time out (give up) if we can not transmit? |
187 | * @param session which session must be used (always NULL for UDP) | ||
187 | * @param addr the addr to send the message to, needs to be a sockaddr for us | 188 | * @param addr the addr to send the message to, needs to be a sockaddr for us |
188 | * @param addrlen the len of addr | 189 | * @param addrlen the len of addr |
189 | * @param force_address GNUNET_YES if the plugin MUST use the given address, | 190 | * @param force_address GNUNET_YES if the plugin MUST use the given address, |
@@ -206,6 +207,7 @@ udp_plugin_send (void *cls, | |||
206 | size_t msgbuf_size, | 207 | size_t msgbuf_size, |
207 | unsigned int priority, | 208 | unsigned int priority, |
208 | struct GNUNET_TIME_Relative timeout, | 209 | struct GNUNET_TIME_Relative timeout, |
210 | struct Session *session, | ||
209 | const void *addr, | 211 | const void *addr, |
210 | size_t addrlen, | 212 | size_t addrlen, |
211 | int force_address, | 213 | int force_address, |
@@ -216,6 +218,7 @@ udp_plugin_send (void *cls, | |||
216 | int ssize; | 218 | int ssize; |
217 | ssize_t sent; | 219 | ssize_t sent; |
218 | 220 | ||
221 | GNUNET_assert (NULL == session); | ||
219 | GNUNET_assert(udp_sock != NULL); | 222 | GNUNET_assert(udp_sock != NULL); |
220 | if ( (addr == NULL) || (addrlen == 0) ) | 223 | if ( (addr == NULL) || (addrlen == 0) ) |
221 | { | 224 | { |
@@ -417,7 +420,8 @@ udp_plugin_select (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
417 | count, ntohs(currhdr->type), ntohs(currhdr->size), offset); | 420 | count, ntohs(currhdr->type), ntohs(currhdr->size), offset); |
418 | #endif | 421 | #endif |
419 | plugin->env->receive (plugin->env->cls, | 422 | plugin->env->receive (plugin->env->cls, |
420 | sender, currhdr, UDP_DIRECT_DISTANCE, (char *)&addr, fromlen); | 423 | sender, currhdr, UDP_DIRECT_DISTANCE, |
424 | NULL, (const char *)&addr, fromlen); | ||
421 | offset += ntohs(currhdr->size); | 425 | offset += ntohs(currhdr->size); |
422 | #if DEBUG_UDP | 426 | #if DEBUG_UDP |
423 | GNUNET_log_from (GNUNET_ERROR_TYPE_INFO, "udp", _ | 427 | GNUNET_log_from (GNUNET_ERROR_TYPE_INFO, "udp", _ |