Diff between 77713a7a4b310991eecdfb0e040751435f751228 and a9262df671e0dcb8c91443ffbab209296eb5e5b5

Changed Files

File Additions Deletions Status
sap/server.c +0 -10 modified

Full Patch

diff --git a/sap/server.c b/sap/server.c
index 00c540e..c83e68a 100644
--- a/sap/server.c
+++ b/sap/server.c
@@ -274,18 +274,8 @@ static int disconnect_ind(void *sap_device, uint8_t disc_type)
 	struct sap_parameter *param = (struct sap_parameter *) msg->param;
 	size_t size = sizeof(struct sap_message);
 
-	if (!conn)
-		return -EINVAL;
-
 	DBG("data %p state %d disc_type 0x%02x", conn, conn->state, disc_type);
 
-	if (conn->state != SAP_STATE_GRACEFUL_DISCONNECT &&
-			conn->state != SAP_STATE_IMMEDIATE_DISCONNECT) {
-		error("Processing error (state %d pr 0x%02x)", conn->state,
-							conn->processing_req);
-		return -EPERM;
-	}
-
 	memset(buf, 0, sizeof(buf));
 	msg->id = SAP_DISCONNECT_IND;
 	msg->nparam = 0x01;