Skip to content

Commit

Permalink
prov/psm: make sure epaddr always has context set.
Browse files Browse the repository at this point in the history
An epaddr could be created when a incoming connection request is
processed instead of psm_ep_connect being called locally.  When
such epaddr is returned by psm_ep_epid_lookup, the context field
is unset.

Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com>
  • Loading branch information
j-xiong committed Aug 21, 2014
1 parent 2cea707 commit 5e691f4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions prov/psm/src/psmx_av.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,15 @@ static int psmx_av_insert(struct fid_av *av, const void *addr, size_t count,
/* prevent connecting to the same ep twice, which is fatal in PSM */
for (i=0; i<count; i++) {
psm_epconn_t epconn;
if (psm_ep_epid_lookup(((psm_epid_t *) addr)[i], &epconn) == PSM_OK)
if (psm_ep_epid_lookup(((psm_epid_t *) addr)[i], &epconn) == PSM_OK) {
((psm_epaddr_t *) fi_addr)[i] = epconn.addr;
else
psmx_set_epaddr_context(fid_av->domain,
((psm_epid_t *) addr)[i],
((psm_epaddr_t *) fi_addr)[i]);
}
else {
mask[i] = 1;
}
}

err = psm_ep_connect(fid_av->domain->psm_ep, count,
Expand Down

0 comments on commit 5e691f4

Please sign in to comment.