Fix code warning.
Change-Id: Ib11fb49f528d3688351ae349d5b4e307c28b3967
diff --git a/mbtk/libmbtk_lib/http/mbtk_http_base.c b/mbtk/libmbtk_lib/http/mbtk_http_base.c
index 657b838..ab4b0ef 100755
--- a/mbtk/libmbtk_lib/http/mbtk_http_base.c
+++ b/mbtk/libmbtk_lib/http/mbtk_http_base.c
@@ -4,25 +4,24 @@
#include "mbtk_log.h"
#include "mbtk_http_base.h"
-static void http_sock_cb_func(int handle, int fd, int event);
-
static bool http_sock_inited = FALSE;
-static int http_handle = -1;
-static int http_fd = -1;
+static mbtk_sock_handle http_handle = -1;
+static mbtk_sock_session http_fd = -1;
-static void http_sock_cb_func(int handle, int fd, int event)
+static void http_sock_cb_func(mbtk_sock_handle handle, mbtk_sock_cb_info_s *sock_info)
{
- if(http_handle == handle && http_fd == fd) {
- if(event & EPOLLIN) { // READ
+ if(http_handle == handle && sock_info && http_fd == sock_info->sock_fd) {
+ if(sock_info->event & EPOLLIN) { // READ
- } else if(event & EPOLLRDHUP) { // Close
+ } else if(sock_info->event & EPOLLRDHUP) { // Close
} else {
- LOGW("Unknown event:%x",event);
+ LOGW("Unknown event:%x",sock_info->event);
}
}
}
+
int mbtk_http_init()
{
if(http_sock_inited) {