1
1

Fix event registration - need to increment the event index and record the number of codes in the event handler

Signed-off-by: Ralph Castain <rhc@open-mpi.org>
Этот коммит содержится в:
Ralph Castain 2017-04-13 17:35:10 -07:00
родитель 38d712ab96
Коммит ffbfd22d84

Просмотреть файл

@ -432,6 +432,7 @@ static void reg_event_hdlr(int sd, short args, void *cbdata)
}
index = pmix_globals.events.nhdlrs;
evhdlr->index = index;
++pmix_globals.events.nhdlrs;
evhdlr->rng.range = range;
if (NULL != parray) {
evhdlr->rng.nprocs = nprocs;
@ -455,6 +456,7 @@ static void reg_event_hdlr(int sd, short args, void *cbdata)
goto ack;
}
memcpy(evhdlr->codes, cd->codes, cd->ncodes * sizeof(pmix_status_t));
evhdlr->ncodes = cd->ncodes;
}
if (firstoverall) {
pmix_globals.events.first = evhdlr;
@ -502,6 +504,7 @@ static void reg_event_hdlr(int sd, short args, void *cbdata)
}
index = pmix_globals.events.nhdlrs;
evhdlr->index = index;
++pmix_globals.events.nhdlrs;
evhdlr->precedence = location;
evhdlr->locator = locator;
evhdlr->rng.range = range;
@ -530,6 +533,7 @@ static void reg_event_hdlr(int sd, short args, void *cbdata)
goto ack;
}
memcpy(evhdlr->codes, cd->codes, cd->ncodes * sizeof(pmix_status_t));
evhdlr->ncodes = cd->ncodes;
if (1 == cd->ncodes) {
cd->list = &pmix_globals.events.single_events;
} else {