From: Jennifer Richards Date: Mon, 7 May 2018 16:05:23 +0000 (-0400) Subject: Merge branch 'milestone/monitoring' into jennifer/no_mq_priorities X-Git-Tag: 3.4.0~1^2~32^2 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=trust_router.git;a=commitdiff_plain;h=c3962902ebd3d3f69725c9976f81b0b25c18f45c Merge branch 'milestone/monitoring' into jennifer/no_mq_priorities --- c3962902ebd3d3f69725c9976f81b0b25c18f45c diff --cc tr/tr_trp.c index 44f001a,6cf2e46..126cf66 --- a/tr/tr_trp.c +++ b/tr/tr_trp.c @@@ -678,9 -611,10 +611,10 @@@ static void *tr_trpc_thread(void *arg talloc_free(tmp_ctx); return NULL; } - tr_debug("tr_trpc_thread: connected to peer %s", peer_gssname->buf); + tr_debug("tr_trpc_thread: connected to peer %.*s", + peer_gssname->len, peer_gssname->buf); - msg=tr_mq_msg_new(tmp_ctx, TR_MQMSG_TRPC_CONNECTED, TR_MQ_PRIO_HIGH); + msg= tr_mq_msg_new(tmp_ctx, TR_MQMSG_TRPC_CONNECTED); tr_mq_msg_set_payload(msg, (void *)tr_dup_name(peer_gssname), tr_free_name_helper); if (msg==NULL) { tr_err("tr_trpc_thread: error allocating TR_MQ_MSG"); @@@ -726,21 -665,12 +665,11 @@@ } } - tr_debug("tr_trpc_thread: Disconnected. Waiting to terminate thread."); - trpc->shutting_down = 1; - /* Send a DISCONNECTED message to the main thread */ - tr_debug("tr_trpc_thread: notifying main thread of disconnection."); - msg=tr_mq_msg_new(tmp_ctx, TR_MQMSG_TRPC_DISCONNECTED, TR_MQ_PRIO_NORMAL); + msg= tr_mq_msg_new(tmp_ctx, TR_MQMSG_TRPC_DISCONNECTED); tr_mq_msg_set_payload(msg, (void *)trpc, NULL); /* do not pass a free routine */ if (msg==NULL) { - /* can't notify main thread of exit - just do it and hope for the best */ + /* can't notify main thread */ tr_err("tr_trpc_thread: error allocating TR_MQ_MSG"); } else { trps_mq_add(trps, msg);