Fix code warning.
Change-Id: Ib11fb49f528d3688351ae349d5b4e307c28b3967
diff --git a/mbtk/libmbtk_lib_v2/http/mbtk_http_base.c b/mbtk/libmbtk_lib_v2/http/mbtk_http_base.c
index 657b838..6fbf898 100755
--- a/mbtk/libmbtk_lib_v2/http/mbtk_http_base.c
+++ b/mbtk/libmbtk_lib_v2/http/mbtk_http_base.c
@@ -4,21 +4,21 @@
#include "mbtk_log.h"
#include "mbtk_http_base.h"
-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);
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);
}
}
}
diff --git a/mbtk/libmbtk_lib_v2/net/mbtk_sock2.c b/mbtk/libmbtk_lib_v2/net/mbtk_sock2.c
index ae5329e..2b508a5 100755
--- a/mbtk/libmbtk_lib_v2/net/mbtk_sock2.c
+++ b/mbtk/libmbtk_lib_v2/net/mbtk_sock2.c
@@ -919,7 +919,7 @@
}
extern int mbtk_sock_write(mbtk_sock_handle handle,mbtk_sock_session session,
- void *buffer,
+ const void *buffer,
unsigned int buf_len,
unsigned int timeout,
int *mbtk_errno)