From 709c5a98c853db14bf92529ac749977a811f3d12 Mon Sep 17 00:00:00 2001 From: cfif Date: Fri, 20 Dec 2024 12:42:25 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D0=B0?= =?UTF-8?q?=20=D0=BD=D0=B5=20=D0=B2=D0=B0=D0=BB=D0=B8=D0=B4=D0=BD=D0=BE?= =?UTF-8?q?=D0=B3=D0=BE=20=D0=B7=D0=B0=D0=BA=D1=80=D1=8B=D1=82=D0=B8=D1=8F?= =?UTF-8?q?=20=D1=81=D0=BE=D0=B5=D0=B4=D0=B8=D0=BD=D0=B5=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gsm_SockInt_Open.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gsm_SockInt_Open.c b/Gsm_SockInt_Open.c index 5a18d0b..2c52930 100755 --- a/Gsm_SockInt_Open.c +++ b/Gsm_SockInt_Open.c @@ -122,7 +122,7 @@ uint8_t Gsm_Socket_open(tSocketGsm *env, eSocketType type, char *addr, size_t ad void Gsm_Socket_close(tSocketGsm *env, uint8_t contextId) { if (osMutexAcquire(env->access, defaultSocketTimeout) == osOK) { - if (contextId != SOCKET_WRONG_CONTEXT) { + if ((contextId != SOCKET_WRONG_CONTEXT) && (contextId != 0)) { AtGsmTelitLe910_CloseConnection(env->gsmAt, contextId); GsmSocketSlot_Clear(env->slots + contextId); } else {