diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-08-09 16:43:47 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-08-09 16:43:47 +0200 |
commit | 5b7ed686d4a6c4ecb8e0302a42e85bb9bff42cac (patch) | |
tree | a0f042cf8afdaa3fb57ba142990297c9a68ca9bb /src/cadet | |
parent | 7caba06019ecc5775d3dbb513b70f52f620affb5 (diff) | |
parent | c1d682ec363c5cb4e8fdca5ee9b4dd8eaff29204 (diff) | |
download | gnunet-5b7ed686d4a6c4ecb8e0302a42e85bb9bff42cac.tar.gz gnunet-5b7ed686d4a6c4ecb8e0302a42e85bb9bff42cac.zip |
merge
Diffstat (limited to 'src/cadet')
-rw-r--r-- | src/cadet/cadet.conf.in | 2 | ||||
-rw-r--r-- | src/cadet/cadet_api.c | 20 | ||||
-rw-r--r-- | src/cadet/gnunet-cadet.c | 2 |
3 files changed, 14 insertions, 10 deletions
diff --git a/src/cadet/cadet.conf.in b/src/cadet/cadet.conf.in index 2f4c6a6db..d1ddcb96f 100644 --- a/src/cadet/cadet.conf.in +++ b/src/cadet/cadet.conf.in | |||
@@ -8,7 +8,7 @@ BINARY = gnunet-service-cadet | |||
8 | ACCEPT_FROM = 127.0.0.1; | 8 | ACCEPT_FROM = 127.0.0.1; |
9 | ACCEPT_FROM6 = ::1; | 9 | ACCEPT_FROM6 = ::1; |
10 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-service-cadet.sock | 10 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-service-cadet.sock |
11 | UNIX_MATCH_UID = YES | 11 | UNIX_MATCH_UID = NO |
12 | UNIX_MATCH_GID = YES | 12 | UNIX_MATCH_GID = YES |
13 | 13 | ||
14 | 14 | ||
diff --git a/src/cadet/cadet_api.c b/src/cadet/cadet_api.c index 980b9abbf..e2ca461a5 100644 --- a/src/cadet/cadet_api.c +++ b/src/cadet/cadet_api.c | |||
@@ -841,6 +841,7 @@ handle_mq_error (void *cls, | |||
841 | h); | 841 | h); |
842 | GNUNET_MQ_destroy (h->mq); | 842 | GNUNET_MQ_destroy (h->mq); |
843 | h->mq = NULL; | 843 | h->mq = NULL; |
844 | GNUNET_assert (NULL == h->reconnect_task); | ||
844 | h->reconnect_task = GNUNET_SCHEDULER_add_delayed (h->reconnect_time, | 845 | h->reconnect_task = GNUNET_SCHEDULER_add_delayed (h->reconnect_time, |
845 | &reconnect_cbk, | 846 | &reconnect_cbk, |
846 | h); | 847 | h); |
@@ -1253,18 +1254,21 @@ GNUNET_CADET_disconnect (struct GNUNET_CADET_Handle *handle) | |||
1253 | void | 1254 | void |
1254 | GNUNET_CADET_close_port (struct GNUNET_CADET_Port *p) | 1255 | GNUNET_CADET_close_port (struct GNUNET_CADET_Port *p) |
1255 | { | 1256 | { |
1256 | struct GNUNET_CADET_PortMessage *msg; | ||
1257 | struct GNUNET_MQ_Envelope *env; | ||
1258 | |||
1259 | GNUNET_assert (GNUNET_YES == | 1257 | GNUNET_assert (GNUNET_YES == |
1260 | GNUNET_CONTAINER_multihashmap_remove (p->cadet->ports, | 1258 | GNUNET_CONTAINER_multihashmap_remove (p->cadet->ports, |
1261 | &p->id, | 1259 | &p->id, |
1262 | p)); | 1260 | p)); |
1263 | env = GNUNET_MQ_msg (msg, | 1261 | if (NULL != p->cadet->mq) |
1264 | GNUNET_MESSAGE_TYPE_CADET_LOCAL_PORT_CLOSE); | 1262 | { |
1265 | msg->port = p->id; | 1263 | struct GNUNET_CADET_PortMessage *msg; |
1266 | GNUNET_MQ_send (p->cadet->mq, | 1264 | struct GNUNET_MQ_Envelope *env; |
1267 | env); | 1265 | |
1266 | env = GNUNET_MQ_msg (msg, | ||
1267 | GNUNET_MESSAGE_TYPE_CADET_LOCAL_PORT_CLOSE); | ||
1268 | msg->port = p->id; | ||
1269 | GNUNET_MQ_send (p->cadet->mq, | ||
1270 | env); | ||
1271 | } | ||
1268 | GNUNET_free_non_null (p->handlers); | 1272 | GNUNET_free_non_null (p->handlers); |
1269 | GNUNET_free (p); | 1273 | GNUNET_free (p); |
1270 | } | 1274 | } |
diff --git a/src/cadet/gnunet-cadet.c b/src/cadet/gnunet-cadet.c index d629df9b2..13b04b885 100644 --- a/src/cadet/gnunet-cadet.c +++ b/src/cadet/gnunet-cadet.c | |||
@@ -231,7 +231,7 @@ shutdown_task (void *cls) | |||
231 | } | 231 | } |
232 | } | 232 | } |
233 | 233 | ||
234 | void * | 234 | void |
235 | mq_cb(void *cls) | 235 | mq_cb(void *cls) |
236 | { | 236 | { |
237 | listen_stdio (); | 237 | listen_stdio (); |