If targets are first defined and iSNS is enabled later, go ahead
and register all defined targets at once.
Signed-Off-By: Chandra Seetharaman <sekharan@xxxxxxxxxx>
---
usr/iscsi/isns.c | 5 +++++
1 file changed, 5 insertions(+)
Index: tgt-469b574/usr/iscsi/isns.c
===================================================================
--- tgt-469b574.orig/usr/iscsi/isns.c
+++ tgt-469b574/usr/iscsi/isns.c
@@ -896,6 +896,7 @@ int isns_init(void)
int err;
char port[8];
struct addrinfo hints, *res;
+ struct iscsi_target *target;
snprintf(port, sizeof(port), "%d", isns_port);
memset(&hints, 0, sizeof(hints));
@@ -923,6 +924,10 @@ int isns_init(void)
use_isns = 1;
+ if (!num_targets)
+ list_for_each_entry(target, &iscsi_targets_list, tlist)
+ isns_target_register(tgt_targetname(target->tid));
+
return 0;
}
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux SCSI]
[Linux RAID]
[Linux Clusters]
[Linux USB Devel]
[Video for Linux]
[Linux Audio Users]
[Photo]
[Yosemite News]
[Yosemite Photos]
[Free Online Dating]
[Linux Kernel]
[XFree86]
[Video Devices]