[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r10290 - gnunet/src/transport
From: |
gnunet |
Subject: |
[GNUnet-SVN] r10290 - gnunet/src/transport |
Date: |
Sun, 14 Feb 2010 23:56:35 +0100 |
Author: grothoff
Date: 2010-02-14 23:56:35 +0100 (Sun, 14 Feb 2010)
New Revision: 10290
Modified:
gnunet/src/transport/plugin_transport_tcp.c
Log:
fixing non-terminating loop
Modified: gnunet/src/transport/plugin_transport_tcp.c
===================================================================
--- gnunet/src/transport/plugin_transport_tcp.c 2010-02-13 23:49:06 UTC (rev
10289)
+++ gnunet/src/transport/plugin_transport_tcp.c 2010-02-14 22:56:35 UTC (rev
10290)
@@ -572,7 +572,7 @@
static ssize_t
tcp_plugin_send (void *cls,
const struct GNUNET_PeerIdentity *target,
- char *msg,
+ const char *msg,
size_t msgbuf_size,
uint32_t priority,
struct GNUNET_TIME_Relative timeout,
@@ -722,23 +722,30 @@
"Asked to cancel session with `%4s'\n",
GNUNET_i2s (target));
#endif
- while (NULL != (session = find_session_by_target (plugin, target)))
+ session = plugin->sessions;
+ while (NULL != session)
{
- pm = session->pending_messages;
- while (pm != NULL)
+ if (0 == memcmp (target,
+ &session->target,
+ sizeof (struct GNUNET_PeerIdentity)))
{
- pm->transmit_cont = NULL;
- pm->transmit_cont_cls = NULL;
- pm = pm->next;
+ pm = session->pending_messages;
+ while (pm != NULL)
+ {
+ pm->transmit_cont = NULL;
+ pm->transmit_cont_cls = NULL;
+ pm = pm->next;
+ }
+ if (session->client != NULL)
+ {
+ GNUNET_SERVER_client_drop (session->client);
+ session->client = NULL;
+ }
+ /* rest of the clean-up of the session will be done as part of
+ disconnect_notify which should be triggered any time now
+ (or which may be triggering this call in the first place) */
}
- if (session->client != NULL)
- {
- GNUNET_SERVER_client_drop (session->client);
- session->client = NULL;
- }
- /* rest of the clean-up of the session will be done as part of
- disconnect_notify which should be triggered any time now
- (or which may be triggering this call in the first place) */
+ session = session->next;
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r10290 - gnunet/src/transport,
gnunet <=