From 441739b5a42aa2c5721858d5a4b4f59702bf55ab Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Mon, 20 Jun 2016 12:23:27 -0700 Subject: [PATCH] Cleanup a lagging message that generates an annoying (but seemingly harmless) warning --- .../pmix/pmix2x/pmix/src/server/pmix_server.c | 16 +++++++++++++++- .../pmix/pmix2x/pmix/src/usock/usock_sendrecv.c | 3 ++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/opal/mca/pmix/pmix2x/pmix/src/server/pmix_server.c b/opal/mca/pmix/pmix2x/pmix/src/server/pmix_server.c index 2dec6939d3..357cc8b857 100644 --- a/opal/mca/pmix/pmix2x/pmix/src/server/pmix_server.c +++ b/opal/mca/pmix/pmix2x/pmix/src/server/pmix_server.c @@ -1974,12 +1974,14 @@ static void notifyerror_cbfunc (pmix_status_t status, void *cbdata) static pmix_status_t server_switchyard(pmix_peer_t *peer, uint32_t tag, pmix_buffer_t *buf) { - pmix_status_t rc; + pmix_status_t rc=PMIX_ERR_NOT_SUPPORTED; int32_t cnt; pmix_cmd_t cmd; pmix_server_caddy_t *cd; pmix_proc_t proc; pmix_buffer_t *reply; + pmix_regevents_info_t *reginfo; + pmix_peer_events_info_t *prev; /* retrieve the cmd */ cnt = 1; @@ -2036,6 +2038,18 @@ static pmix_status_t server_switchyard(pmix_peer_t *peer, uint32_t tag, PMIX_PEER_CADDY(cd, peer, tag); (void)strncpy(proc.nspace, peer->info->nptr->nspace, PMIX_MAX_NSLEN); proc.rank = peer->info->rank; + /* since the client is finalizing, remove them from any event + * registrations they may still have on our list */ + PMIX_LIST_FOREACH(reginfo, &pmix_server_globals.events, pmix_regevents_info_t) { + PMIX_LIST_FOREACH(prev, ®info->peers, pmix_peer_events_info_t) { + if (prev->peer == peer) { + pmix_list_remove_item(®info->peers, &prev->super); + PMIX_RELEASE(prev); + break; + } + } + } + /* now tell the host server */ if (PMIX_SUCCESS != (rc = pmix_host_server.client_finalized(&proc, peer->info->server_object, op_cbfunc, cd))) { PMIX_RELEASE(cd); diff --git a/opal/mca/pmix/pmix2x/pmix/src/usock/usock_sendrecv.c b/opal/mca/pmix/pmix2x/pmix/src/usock/usock_sendrecv.c index 9f66dc8f2a..139cb856df 100644 --- a/opal/mca/pmix/pmix2x/pmix/src/usock/usock_sendrecv.c +++ b/opal/mca/pmix/pmix2x/pmix/src/usock/usock_sendrecv.c @@ -225,8 +225,9 @@ void pmix_usock_send_handler(int sd, short flags, void *cbdata) pmix_status_t rc; pmix_output_verbose(2, pmix_globals.debug_output, - "sock:send_handler SENDING TO PEER %s:%d with %s msg", + "sock:send_handler SENDING TO PEER %s:%d tag %d with %s msg", peer->info->nptr->nspace, peer->info->rank, + (NULL == msg) ? -1 : msg->hdr.tag, (NULL == msg) ? "NULL" : "NON-NULL"); if (NULL != msg) { if (!msg->hdr_sent) {