Merge branch 'milestone/monitoring' into jennifer/no_mq_priorities
authorJennifer Richards <jennifer@painless-security.com>
Mon, 7 May 2018 16:05:23 +0000 (12:05 -0400)
committerGitHub <noreply@github.com>
Mon, 7 May 2018 16:05:23 +0000 (12:05 -0400)
1  2 
common/tr_mq.c
tr/tr_tid.c
tr/tr_trp.c

diff --cc common/tr_mq.c
Simple merge
diff --cc tr/tr_tid.c
Simple merge
diff --cc 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");
      }
    }
  
-   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);