DORMANTno replies

[PATCH 5/7] common: check for valid states during ep posting

From: Davis, Arlin R <hidden>
Date: 2012-07-05 16:38:33
Subsystem: the rest · Maintainer: Linus Torvalds

Signed-off-by: Arlin Davis <redacted>
---
 dapl/common/dapl_ep_util.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/dapl/common/dapl_ep_util.c b/dapl/common/dapl_ep_util.c
index 5133f59..8ceb1be 100644
--- a/dapl/common/dapl_ep_util.c
+++ b/dapl/common/dapl_ep_util.c
@@ -352,6 +352,10 @@ dapl_ep_post_send_req(IN DAT_EP_HANDLE ep_handle,
 
 	ep_ptr = (DAPL_EP *) ep_handle;
 
+	if ((ep_ptr->param.ep_state != DAT_EP_STATE_CONNECTED) &&
+	    (ep_ptr->param.ep_state != DAT_EP_STATE_DISCONNECTED))
+		return(DAT_ERROR(DAT_INVALID_STATE, DAT_INVALID_STATE_EP_UNCONNECTED));
+
 	/*
 	 * Synchronization ok since this buffer is only used for send
 	 * requests, which aren't allowed to race with each other.
-- 
1.7.3




�{.n�+�������+%��lzwm��b�맲��r��zX��ݙ�����ܨ}���Ơz�&j:+v����n�r��6;靫3��\
nnX��f�z��2�ޙ���&�)ߡ�a����
�G���h��j:+v���w�٥
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help