aboutsummaryrefslogtreecommitdiff
path: root/src/set/gnunet-service-set.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/set/gnunet-service-set.c')
-rw-r--r--src/set/gnunet-service-set.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/set/gnunet-service-set.c b/src/set/gnunet-service-set.c
index cf03b06aa..428a9d002 100644
--- a/src/set/gnunet-service-set.c
+++ b/src/set/gnunet-service-set.c
@@ -955,8 +955,8 @@ handle_client_evaluate (void *cls,
955 GNUNET_CONTAINER_DLL_insert (set->ops_head, set->ops_tail, op); 955 GNUNET_CONTAINER_DLL_insert (set->ops_head, set->ops_tail, op);
956 956
957 op->channel = GNUNET_MESH_channel_create (mesh, op, &msg->target_peer, 957 op->channel = GNUNET_MESH_channel_create (mesh, op, &msg->target_peer,
958 GNUNET_APPLICATION_TYPE_SET, 958 GNUNET_APPLICATION_TYPE_SET,
959 GNUNET_MESH_OPTION_RELIABLE); 959 GNUNET_MESH_OPTION_RELIABLE);
960 960
961 op->mq = GNUNET_MESH_mq_create (op->channel); 961 op->mq = GNUNET_MESH_mq_create (op->channel);
962 962
@@ -1261,17 +1261,28 @@ channel_new_cb (void *cls,
1261 */ 1261 */
1262static void 1262static void
1263channel_end_cb (void *cls, 1263channel_end_cb (void *cls,
1264 const struct GNUNET_MESH_Channel *channel, void *channel_ctx) 1264 const struct GNUNET_MESH_Channel *channel, void *channel_ctx)
1265{ 1265{
1266 struct Operation *op = channel_ctx; 1266 struct Operation *op = channel_ctx;
1267 1267
1268 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1268 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1269 "channel end cb called\n"); 1269 "channel end cb called\n");
1270 op->channel = NULL; 1270 op->channel = NULL;
1271 /* the vt can be null if a client already requested canceling op. */
1271 if (NULL != op->vt) 1272 if (NULL != op->vt)
1273 {
1274 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1275 "calling peer disconnect due to channel end\n");
1272 op->vt->peer_disconnect (op); 1276 op->vt->peer_disconnect (op);
1277 }
1278
1279 if (GNUNET_YES == op->keep)
1280 return;
1281
1273 /* mesh will never call us with the context again! */ 1282 /* mesh will never call us with the context again! */
1274 GNUNET_free (channel_ctx); 1283 GNUNET_free (channel_ctx);
1284 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1285 "channel end cb finished\n");
1275} 1286}
1276 1287
1277 1288