Login: remember what the TargetAddress returned during login is so we can

handle redirect 'errors'.
This commit is contained in:
Ronnie Sahlberg
2011-02-25 15:35:49 +11:00
parent e9749ee68c
commit 356a6571bb
4 changed files with 59 additions and 29 deletions

View File

@@ -55,6 +55,7 @@ enum iscsi_immediate_data {
struct iscsi_context {
const char *initiator_name;
const char *target_name;
const char *target_address; /* If a redirect */
const char *alias;
const char *user;

View File

@@ -151,6 +151,11 @@ int iscsi_set_alias(struct iscsi_context *iscsi, const char *alias);
*/
int iscsi_set_targetname(struct iscsi_context *iscsi, const char *targetname);
/*
* This function returns any target address supplied in a login response when
* the target has moved.
*/
const char *iscsi_get_target_address(struct iscsi_context *iscsi);
/* Type of iscsi sessions. Discovery sessions are used to query for what
* targets exist behind the portal connected to. Normal sessions are used to