aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_udp.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-03-19 13:22:43 +0000
committerChristian Grothoff <christian@grothoff.org>2010-03-19 13:22:43 +0000
commitc0bb6897499d729673abd2f7d3ff1027c95b93fc (patch)
tree105014cc2a11ce2f490215115cd39d1417728161 /src/transport/plugin_transport_udp.c
parente98b0a89bb7a9b28a916cb8aa5cd7649c66e7b52 (diff)
downloadgnunet-c0bb6897499d729673abd2f7d3ff1027c95b93fc.tar.gz
gnunet-c0bb6897499d729673abd2f7d3ff1027c95b93fc.zip
fixing disconnect handling, making TCP plugin ready for bi-di use
Diffstat (limited to 'src/transport/plugin_transport_udp.c')
-rw-r--r--src/transport/plugin_transport_udp.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c
index 739716b17..bdec32490 100644
--- a/src/transport/plugin_transport_udp.c
+++ b/src/transport/plugin_transport_udp.c
@@ -186,8 +186,11 @@ udp_transport_server_stop (void *cls)
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 addr the addr to send the message to, needs to be a sockaddr for us 187 * @param addr the addr to send the message to, needs to be a sockaddr for us
188 * @param addrlen the len of addr 188 * @param addrlen the len of addr
189 * @param force_address not used, we had better have an address to send to 189 * @param force_address GNUNET_YES if the plugin MUST use the given address,
190 * because we are stateless!! 190 * GNUNET_NO means the plugin may use any other address and
191 * GNUNET_SYSERR means that only reliable existing
192 * bi-directional connections should be used (regardless
193 * of address)
191 * @param cont continuation to call once the message has 194 * @param cont continuation to call once the message has
192 * been transmitted (or if the transport is ready 195 * been transmitted (or if the transport is ready
193 * for the next transmission call; or if the 196 * for the next transmission call; or if the
@@ -222,6 +225,8 @@ udp_plugin_send (void *cls,
222#endif 225#endif
223 return -1; /* Can never send if we don't have an address!! */ 226 return -1; /* Can never send if we don't have an address!! */
224 } 227 }
228 if (force_address == GNUNET_SYSERR)
229 return -1; /* never reliable */
225 230
226 /* Build the message to be sent */ 231 /* Build the message to be sent */
227 message = GNUNET_malloc (sizeof (struct UDPMessage) + msgbuf_size); 232 message = GNUNET_malloc (sizeof (struct UDPMessage) + msgbuf_size);