@@ -935,16 +935,18 @@ int main(int argc, char **argv)
if (dr_path) {
if ((resolved =
resolve_portid_str(ibd_ca, ibd_ca_port, &portid, dr_path,
- IB_DEST_DRPATH, NULL, ibmad_port)) < 0)
- IBWARN("Failed to resolve %s; attempting full scan",
- dr_path);
+ IB_DEST_DRPATH, NULL, ibmad_port)) < 0) {
+ IBWARN("Failed to resolve %s;",dr_path);
+ goto close_port;
+ }
} else if (port_guid_str) {
if ((resolved =
resolve_portid_str(ibd_ca, ibd_ca_port, &portid,
port_guid_str, IB_DEST_GUID, ibd_sm_id,
- ibmad_port)) < 0)
- IBWARN("Failed to resolve %s; attempting full scan",
- port_guid_str);
+ ibmad_port)) < 0) {
+ IBWARN("Failed to resolve %s;",port_guid_str);
+ goto close_port;
+ }
}
if (load_cache_file) {