On 6/4/2012 3:19 PM, Hefty, Sean wrote: > Problem and cause reported by Hal Rosenstock <[email protected]> > > Signed-off-by: Sean Hefty <[email protected]>
Thanks. Tested-by: Hal Rosenstock <[email protected]> > --- > src/acme.c | 14 +++++++++----- > 1 files changed, 9 insertions(+), 5 deletions(-) > > diff --git a/src/acme.c b/src/acme.c > index e6ae188..0e1d4ed 100644 > --- a/src/acme.c > +++ b/src/acme.c > @@ -495,7 +495,8 @@ static int resolve_lid(struct ibv_path_record *path) > { > int ret; > > - path->slid = htons((uint16_t) atoi(src_addr)); > + if (src_addr) > + path->slid = htons((uint16_t) atoi(src_addr)); > path->dlid = htons((uint16_t) atoi(dest_addr)); > path->reversible_numpath = IBV_PATH_RECORD_REVERSIBLE | 1; > > @@ -510,10 +511,13 @@ static int resolve_gid(struct ibv_path_record *path) > { > int ret; > > - ret = inet_pton(AF_INET6, src_addr, &path->sgid); > - if (ret <= 0) { > - printf("inet_pton error on source address (%s): 0x%x\n", > src_addr, ret); > - return ret ? ret : -1; > + if (src_addr) { > + ret = inet_pton(AF_INET6, src_addr, &path->sgid); > + if (ret <= 0) { > + printf("inet_pton error on source address (%s): 0x%x\n", > + src_addr, ret); > + return ret ? ret : -1; > + } > } > > ret = inet_pton(AF_INET6, dest_addr, &path->dgid); > > > -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
