Close file descriptors for socket appropriately during SoftAP disconnect.
Change-Id: Idadae26ce6bbdf1ea6f6b1eaa63cd890bbfcb541 CRs-Fixed: 293934
This commit is contained in:
8
softap/jni/QWiFiSoftApCfg.c
Normal file → Executable file
8
softap/jni/QWiFiSoftApCfg.c
Normal file → Executable file
@@ -313,7 +313,8 @@ JNIEXPORT jstring JNICALL
|
||||
const char *pcmd;
|
||||
char cmd[MAX_CMD_SIZE];
|
||||
char resp[MAX_RESP_SIZE];
|
||||
int sock, rc;
|
||||
int sock = -1;
|
||||
int rc;
|
||||
int done = 0;
|
||||
char code[32] = {0};
|
||||
int connect_retry;
|
||||
@@ -400,5 +401,10 @@ JNIEXPORT jstring JNICALL
|
||||
end:
|
||||
(*env)->ReleaseStringUTFChars(env, jcmd, pcmd);
|
||||
|
||||
if( sock >= 0 ){
|
||||
close(sock);
|
||||
sock = -1;
|
||||
}
|
||||
|
||||
return (*env)->NewStringUTF(env, resp);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user