Discovery: Create a list of portals for each discovered target.

Some targets return multiple TargetAddress for individual targets.
Create a linked list of addresses for each target instead of
failing the discovery process when this happens.
This commit is contained in:
Ronnie Sahlberg
2014-01-15 19:37:40 -08:00
parent 25078d0d91
commit 354f00fd4f
4 changed files with 47 additions and 15 deletions

View File

@@ -566,13 +566,13 @@ void discovery_cb(struct iscsi_context *iscsi, int status, void *command_data, v
}
for(addr=command_data; addr; addr=addr->next) {
printf("Target:%s Address:%s\n", addr->target_name, addr->target_address);
printf("Target:%s Address:%s\n", addr->target_name, addr->portals->portal);
}
addr=command_data;
clnt->has_discovered_target = 1;
clnt->target_name = strdup(addr->target_name);
clnt->target_address = strdup(addr->target_address);
clnt->target_address = strdup(addr->portals->portal);
printf("discovery complete, send logout command\n");