Skip to content

Commit 3202de8

Browse files
author
Ralph Castain
authored
Merge pull request #3349 from rhc54/topic/reg
Fix event registration - need to increment the event index and record the number of codes in the event handler
2 parents fbf714d + ffbfd22 commit 3202de8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

opal/mca/pmix/pmix2x/pmix/src/event/pmix_event_registration.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,7 @@ static void reg_event_hdlr(int sd, short args, void *cbdata)
432432
}
433433
index = pmix_globals.events.nhdlrs;
434434
evhdlr->index = index;
435+
++pmix_globals.events.nhdlrs;
435436
evhdlr->rng.range = range;
436437
if (NULL != parray) {
437438
evhdlr->rng.nprocs = nprocs;
@@ -455,6 +456,7 @@ static void reg_event_hdlr(int sd, short args, void *cbdata)
455456
goto ack;
456457
}
457458
memcpy(evhdlr->codes, cd->codes, cd->ncodes * sizeof(pmix_status_t));
459+
evhdlr->ncodes = cd->ncodes;
458460
}
459461
if (firstoverall) {
460462
pmix_globals.events.first = evhdlr;
@@ -502,6 +504,7 @@ static void reg_event_hdlr(int sd, short args, void *cbdata)
502504
}
503505
index = pmix_globals.events.nhdlrs;
504506
evhdlr->index = index;
507+
++pmix_globals.events.nhdlrs;
505508
evhdlr->precedence = location;
506509
evhdlr->locator = locator;
507510
evhdlr->rng.range = range;
@@ -530,6 +533,7 @@ static void reg_event_hdlr(int sd, short args, void *cbdata)
530533
goto ack;
531534
}
532535
memcpy(evhdlr->codes, cd->codes, cd->ncodes * sizeof(pmix_status_t));
536+
evhdlr->ncodes = cd->ncodes;
533537
if (1 == cd->ncodes) {
534538
cd->list = &pmix_globals.events.single_events;
535539
} else {

0 commit comments

Comments
 (0)