fix data_call stop block
Change-Id: Ibcf7c1fcb5ee3a1e76e31197aeae71dd0ce60280
diff --git a/mbtk/libmbtk_ril/mbtk_info_api.c b/mbtk/libmbtk_ril/mbtk_info_api.c
index b226408..6dda440 100755
--- a/mbtk/libmbtk_ril/mbtk_info_api.c
+++ b/mbtk/libmbtk_ril/mbtk_info_api.c
@@ -394,14 +394,6 @@
return -1;
}
-#ifdef MBTK_SG_SUPPORT
- if(handle->handle_state)
- {
- LOG("hangdle BUSY.");
- return -2;
- }
-#endif
-
mbtk_info_pack_t* pack = mbtk_info_pack_creat(id);
if(pack == NULL) {
return -1;
@@ -413,13 +405,8 @@
pack->data = (const uint8*)send_buff;
}
-#ifndef MBTK_SG_SUPPORT
pthread_mutex_lock(&handle->send_mutex);
-#endif
pthread_mutex_lock(&handle->mutex);
-#ifdef MBTK_SG_SUPPORT
- handle->handle_state = 1;
-#endif
handle->is_waitting = true;
mbtk_info_pack_send(handle->client_fd, pack);
@@ -440,20 +427,12 @@
handle->data_len = 0;
handle->data = NULL;
}
-#ifdef MBTK_SG_SUPPORT
- handle->handle_state = 0;
-#else
pthread_mutex_unlock(&handle->send_mutex);
-#endif
return recv_len;
} else {
LOG("REQ %s fail : %s", id2str(id), err2str(handle->info_err));
-#ifdef MBTK_SG_SUPPORT
- handle->handle_state = 0;
-#else
- pthread_mutex_unlock(&handle->send_mutex);
-#endif
+ pthread_mutex_unlock(&handle->send_mutex);
return -1;
}