logout: allow additional PDU flags to be passed internally
Signed-off-by: Peter Lieven <pl@kamp.de>
This commit is contained in:
@@ -350,6 +350,10 @@ iscsi_itt_post_increment(struct iscsi_context *iscsi);
|
||||
|
||||
void iscsi_timeout_scan(struct iscsi_context *iscsi);
|
||||
|
||||
int
|
||||
iscsi_logout_async_internal(struct iscsi_context *iscsi, iscsi_command_cb cb,
|
||||
void *private_data, uint32_t flags);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
14
lib/login.c
14
lib/login.c
@@ -1117,10 +1117,9 @@ iscsi_process_login_reply(struct iscsi_context *iscsi, struct iscsi_pdu *pdu,
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
iscsi_logout_async(struct iscsi_context *iscsi, iscsi_command_cb cb,
|
||||
void *private_data)
|
||||
iscsi_logout_async_internal(struct iscsi_context *iscsi, iscsi_command_cb cb,
|
||||
void *private_data, uint32_t flags)
|
||||
{
|
||||
struct iscsi_pdu *pdu;
|
||||
|
||||
@@ -1154,7 +1153,7 @@ iscsi_logout_async(struct iscsi_context *iscsi, iscsi_command_cb cb,
|
||||
|
||||
pdu->callback = cb;
|
||||
pdu->private_data = private_data;
|
||||
pdu->flags |= ISCSI_PDU_CORK_WHEN_SENT;
|
||||
pdu->flags |= ISCSI_PDU_CORK_WHEN_SENT | flags;
|
||||
|
||||
if (iscsi_queue_pdu(iscsi, pdu) != 0) {
|
||||
iscsi_set_error(iscsi, "Out-of-memory: failed to queue iscsi "
|
||||
@@ -1166,6 +1165,13 @@ iscsi_logout_async(struct iscsi_context *iscsi, iscsi_command_cb cb,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
iscsi_logout_async(struct iscsi_context *iscsi, iscsi_command_cb cb,
|
||||
void *private_data)
|
||||
{
|
||||
return iscsi_logout_async_internal(iscsi, cb, private_data, 0);
|
||||
}
|
||||
|
||||
int
|
||||
iscsi_process_logout_reply(struct iscsi_context *iscsi, struct iscsi_pdu *pdu,
|
||||
struct iscsi_in_pdu *in)
|
||||
|
||||
Reference in New Issue
Block a user