Close file descriptors for socket appropriately during SoftAP disconnect.

Change-Id: Idadae26ce6bbdf1ea6f6b1eaa63cd890bbfcb541
CRs-Fixed: 293934
This commit is contained in:
santosh sajjan
2011-07-18 17:11:12 +05:30
parent 14a3ea2c0a
commit 1a6aff9ff6
2 changed files with 17 additions and 2 deletions

8
softap/jni/QWiFiSoftApCfg.c Normal file → Executable file
View 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);
}