aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-05-10 22:24:00 +0000
committerChristian Grothoff <christian@grothoff.org>2012-05-10 22:24:00 +0000
commit8b7ba67e4e201aaa44ef60b51396e29dc379d1fd (patch)
tree24fe0734ae001ab65f0c013ada8d249aa507bff7 /src
parent4559a409cf099a5b2400253f397e156f234f7c51 (diff)
downloadgnunet-8b7ba67e4e201aaa44ef60b51396e29dc379d1fd.tar.gz
gnunet-8b7ba67e4e201aaa44ef60b51396e29dc379d1fd.zip
-eliminating cont-calls check, hard to count exactly with frag
Diffstat (limited to 'src')
-rw-r--r--src/transport/plugin_transport_http_server.c6
-rw-r--r--src/transport/plugin_transport_udp.c13
2 files changed, 2 insertions, 17 deletions
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c
index 7e09245f1..e5e4690d7 100644
--- a/src/transport/plugin_transport_http_server.c
+++ b/src/transport/plugin_transport_http_server.c
@@ -598,13 +598,11 @@ server_access_cb (void *cls, struct MHD_Connection *mhd_connection,
598 const char *upload_data, size_t * upload_data_size, 598 const char *upload_data, size_t * upload_data_size,
599 void **httpSessionCache) 599 void **httpSessionCache)
600{ 600{
601
602 struct Plugin *plugin = cls; 601 struct Plugin *plugin = cls;
603 struct ServerConnection *sc = *httpSessionCache; 602 struct ServerConnection *sc = *httpSessionCache;
604 struct Session *s = NULL; 603 struct Session *s;
605
606 int res = MHD_YES;
607 struct MHD_Response *response; 604 struct MHD_Response *response;
605 int res = MHD_YES;
608 606
609 GNUNET_assert (cls != NULL); 607 GNUNET_assert (cls != NULL);
610 /* new connection */ 608 /* new connection */
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c
index 718ef2131..b14e14357 100644
--- a/src/transport/plugin_transport_udp.c
+++ b/src/transport/plugin_transport_udp.c
@@ -293,7 +293,6 @@ struct UDP_ACK_Message
293 293
294}; 294};
295 295
296static int cont_calls;
297 296
298/** 297/**
299 * We have been notified that our readset has something to read. We don't 298 * We have been notified that our readset has something to read. We don't
@@ -550,8 +549,6 @@ call_continuation (struct UDPMessageWrapper *udpw, int result)
550 if (NULL != udpw->cont) 549 if (NULL != udpw->cont)
551 { 550 {
552 udpw->cont (udpw->cont_cls, &udpw->session->target,result); 551 udpw->cont (udpw->cont_cls, &udpw->session->target,result);
553 GNUNET_assert (cont_calls > 0);
554 cont_calls --;
555 } 552 }
556 553
557} 554}
@@ -703,7 +700,6 @@ disconnect_and_free_it (void *cls, const GNUNET_HashCode * key, void *value)
703 if (NULL != s->frag_ctx->cont) 700 if (NULL != s->frag_ctx->cont)
704 { 701 {
705 s->frag_ctx->cont (s->frag_ctx->cont_cls, &s->target, GNUNET_SYSERR); 702 s->frag_ctx->cont (s->frag_ctx->cont_cls, &s->target, GNUNET_SYSERR);
706 cont_calls --;
707 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 703 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
708 "Calling continuation for fragemented message to `%s' with result SYSERR\n", 704 "Calling continuation for fragemented message to `%s' with result SYSERR\n",
709 GNUNET_i2s (&s->target)); 705 GNUNET_i2s (&s->target));
@@ -1012,7 +1008,6 @@ enqueue_fragment (void *cls, const struct GNUNET_MessageHeader *msg)
1012 udpw->udp = (char *) &udpw[1]; 1008 udpw->udp = (char *) &udpw[1];
1013 1009
1014 udpw->msg_size = msg_len; 1010 udpw->msg_size = msg_len;
1015 cont_calls++;
1016 udpw->cont = &send_next_fragment; 1011 udpw->cont = &send_next_fragment;
1017 udpw->cont_cls = udpw; 1012 udpw->cont_cls = udpw;
1018 udpw->timeout = frag_ctx->timeout; 1013 udpw->timeout = frag_ctx->timeout;
@@ -1144,10 +1139,6 @@ udp_plugin_send (void *cls,
1144 udpw->cont = cont; 1139 udpw->cont = cont;
1145 udpw->cont_cls = cont_cls; 1140 udpw->cont_cls = cont_cls;
1146 udpw->frag_ctx = NULL; 1141 udpw->frag_ctx = NULL;
1147 if (NULL != udpw->cont)
1148 {
1149 cont_calls ++;
1150 }
1151 memcpy (udpw->udp, udp, sizeof (struct UDPMessage)); 1142 memcpy (udpw->udp, udp, sizeof (struct UDPMessage));
1152 memcpy (&udpw->udp[sizeof (struct UDPMessage)], msgbuf, msgbuf_size); 1143 memcpy (&udpw->udp[sizeof (struct UDPMessage)], msgbuf, msgbuf_size);
1153 1144
@@ -1176,8 +1167,6 @@ udp_plugin_send (void *cls,
1176 &enqueue_fragment, 1167 &enqueue_fragment,
1177 frag_ctx); 1168 frag_ctx);
1178 1169
1179 if (NULL != frag_ctx->cont)
1180 cont_calls ++;
1181 s->frag_ctx = frag_ctx; 1170 s->frag_ctx = frag_ctx;
1182 } 1171 }
1183 1172
@@ -1627,7 +1616,6 @@ static void read_process_ack (struct Plugin *plugin,
1627 "Calling continuation for fragmented message to `%s' with result %s\n", 1616 "Calling continuation for fragmented message to `%s' with result %s\n",
1628 GNUNET_i2s (&s->target), "OK"); 1617 GNUNET_i2s (&s->target), "OK");
1629 s->frag_ctx->cont (s->frag_ctx->cont_cls, &udp_ack->sender, GNUNET_OK); 1618 s->frag_ctx->cont (s->frag_ctx->cont_cls, &udp_ack->sender, GNUNET_OK);
1630 cont_calls --;
1631 } 1619 }
1632 1620
1633 GNUNET_free (s->frag_ctx); 1621 GNUNET_free (s->frag_ctx);
@@ -2420,7 +2408,6 @@ libgnunet_plugin_transport_udp_done (void *cls)
2420 plugin->nat = NULL; 2408 plugin->nat = NULL;
2421 GNUNET_free (plugin); 2409 GNUNET_free (plugin);
2422 GNUNET_free (api); 2410 GNUNET_free (api);
2423 GNUNET_assert (0 == cont_calls);
2424 return NULL; 2411 return NULL;
2425} 2412}
2426 2413