aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-12-08 21:06:12 +0000
committerChristian Grothoff <christian@grothoff.org>2013-12-08 21:06:12 +0000
commitd7991f895b89b39d06d60a6f71859616d2b71819 (patch)
treea3e42f23860df3de56038d0e4923df0d2935904e /src
parentc544c71578c4557722aae8c4f0f359decd38f689 (diff)
downloadgnunet-d7991f895b89b39d06d60a6f71859616d2b71819.tar.gz
gnunet-d7991f895b89b39d06d60a6f71859616d2b71819.zip
mark timeout task as done if it is run, fixes #3171
Diffstat (limited to 'src')
-rw-r--r--src/set/gnunet-service-set.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/set/gnunet-service-set.c b/src/set/gnunet-service-set.c
index 13bb38292..96c16325f 100644
--- a/src/set/gnunet-service-set.c
+++ b/src/set/gnunet-service-set.c
@@ -1130,6 +1130,7 @@ shutdown_task (void *cls,
1130 * but did not receive a response in time 1130 * but did not receive a response in time
1131 * - we got the channel from a peer but no GNUNET_MESSAGE_TYPE_SET_P2P_OPERATION_REQUEST 1131 * - we got the channel from a peer but no GNUNET_MESSAGE_TYPE_SET_P2P_OPERATION_REQUEST
1132 * - shutdown (obviously) 1132 * - shutdown (obviously)
1133 *
1133 * @param cls channel context 1134 * @param cls channel context
1134 * @param tc context information (why was this task triggered now) 1135 * @param tc context information (why was this task triggered now)
1135 */ 1136 */
@@ -1139,12 +1140,12 @@ incoming_timeout_cb (void *cls,
1139{ 1140{
1140 struct Operation *incoming = cls; 1141 struct Operation *incoming = cls;
1141 1142
1143 incoming->state->timeout_task = GNUNET_SCHEDULER_NO_TASK;
1142 GNUNET_assert (GNUNET_YES == incoming->is_incoming); 1144 GNUNET_assert (GNUNET_YES == incoming->is_incoming);
1143
1144 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) 1145 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
1145 return; 1146 return;
1146 1147 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1147 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "remote peer timed out\n"); 1148 "remote peer timed out\n");
1148 incoming_destroy (incoming); 1149 incoming_destroy (incoming);
1149} 1150}
1150 1151
@@ -1214,7 +1215,8 @@ channel_new_cb (void *cls,
1214 incoming->mq = GNUNET_MESH_mq_create (incoming->channel); 1215 incoming->mq = GNUNET_MESH_mq_create (incoming->channel);
1215 incoming->vt = &incoming_vt; 1216 incoming->vt = &incoming_vt;
1216 incoming->state->timeout_task = 1217 incoming->state->timeout_task =
1217 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MINUTES, incoming_timeout_cb, incoming); 1218 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MINUTES,
1219 &incoming_timeout_cb, incoming);
1218 GNUNET_CONTAINER_DLL_insert_tail (incoming_head, incoming_tail, incoming); 1220 GNUNET_CONTAINER_DLL_insert_tail (incoming_head, incoming_tail, incoming);
1219 1221
1220 return incoming; 1222 return incoming;