.. | .. |
---|
1079 | 1079 | iscsi_target_set_sock_callbacks(conn); |
---|
1080 | 1080 | |
---|
1081 | 1081 | login->np = np; |
---|
| 1082 | + conn->tpg = NULL; |
---|
1082 | 1083 | |
---|
1083 | 1084 | login_req = (struct iscsi_login_req *) login->req; |
---|
1084 | 1085 | payload_length = ntoh24(login_req->dlength); |
---|
.. | .. |
---|
1148 | 1149 | */ |
---|
1149 | 1150 | sessiontype = strncmp(s_buf, DISCOVERY, 9); |
---|
1150 | 1151 | if (!sessiontype) { |
---|
1151 | | - conn->tpg = iscsit_global->discovery_tpg; |
---|
1152 | 1152 | if (!login->leading_connection) |
---|
1153 | 1153 | goto get_target; |
---|
1154 | 1154 | |
---|
.. | .. |
---|
1165 | 1165 | * Serialize access across the discovery struct iscsi_portal_group to |
---|
1166 | 1166 | * process login attempt. |
---|
1167 | 1167 | */ |
---|
| 1168 | + conn->tpg = iscsit_global->discovery_tpg; |
---|
1168 | 1169 | if (iscsit_access_np(np, conn->tpg) < 0) { |
---|
1169 | 1170 | iscsit_tx_login_rsp(conn, ISCSI_STATUS_CLS_TARGET_ERR, |
---|
1170 | 1171 | ISCSI_LOGIN_STATUS_SVC_UNAVAILABLE); |
---|
| 1172 | + conn->tpg = NULL; |
---|
1171 | 1173 | ret = -1; |
---|
1172 | 1174 | goto out; |
---|
1173 | 1175 | } |
---|