Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1741 from ldorau/examples-fix-wait_and_process_co…
Browse files Browse the repository at this point in the history
…mpletions-in-example-08

examples: fix wait_and_process_completions() in example 08
  • Loading branch information
ldorau authored May 17, 2022
2 parents 338e099 + ea8cf4b commit e711430
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions examples/08-messages-ping-pong/messages-ping-pong-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,8 @@ wait_and_process_completions(struct rpma_cq *cq, uint64_t *recv,
return ret;

/* get two next completions at most (1 of send + 1 of recv) */
if ((ret = rpma_cq_get_wc(cq, MAX_N_WC, wc, &num_got))) {
/* lack of completions is not an error here */
if (ret == RPMA_E_NO_COMPLETION)
continue;
if (ret)
return ret;
}
if ((ret = rpma_cq_get_wc(cq, MAX_N_WC, wc, &num_got)))
return ret;

/* validate received completions */
for (int i = 0; i < num_got; i++) {
Expand Down

0 comments on commit e711430

Please sign in to comment.