Add mbtk_source git commit info
Change-Id: I9867613657db269bba81d28c4b3712062ae41bdd
diff --git a/mbtk/libmbtk_coap/mbtk_coap.c b/mbtk/libmbtk_coap/mbtk_coap.c
index 186255e..226fd5c 100755
--- a/mbtk/libmbtk_coap/mbtk_coap.c
+++ b/mbtk/libmbtk_coap/mbtk_coap.c
@@ -196,7 +196,7 @@
pud_lenth,
type,
code,
- mesageId);
+ mesageId);
int i = 0;
@@ -214,14 +214,14 @@
LOGE("len:%d, i :%d\n",len,i);
if(Payload[len-i -1] == '\0' )
{
- LOGE("==\0-------------------\n");
+ LOGE("==\0-------------------\n");
// coap_log(-1,(char*)Payload,len - i-1);
}else{
LOGE("!=\0--------------------\n");
Payload[0]='\0';
}
- buffer_len = strlen(dest) + strlen(Payload);
+ buffer_len = strlen(dest) + strlen(Payload);
strcat(dest,Payload);
LOGE("2---------buffer_len:%d,coap_recv_buffer_dest:%s,Payload:%s\n",buffer_len,dest,Payload);
return buffer_len;
@@ -335,7 +335,7 @@
memcpy(ptr,"5.05",4);
break;
default:
- sprintf(ptr, "UndefCod%u",(unsigned)(coapGetRecvCode()));
+ sprintf(ptr, "UndefCod%u",(unsigned)(coapGetRecvCode()));
}
}
@@ -366,7 +366,7 @@
mbtk_ecoap_package_s *coap_next = NULL;
mbtk_ecoap_option_s * option_ptr = NULL;
mbtk_ecoap_option_s * option_ptr_next = NULL;
-
+
while(coap != NULL)
{
coap_next = coap->next;
@@ -383,9 +383,9 @@
option_ptr = NULL;
option_ptr = option_ptr_next;
}
-
+
}
-
+
free(coap);
coap = NULL;
coap = coap_next;
@@ -533,7 +533,7 @@
}
else // Not first item.
{
- while(coap->next != NULL)
+ while(coap->next != NULL)
{
if(message_id == coap->next->message_id) // delete
{
@@ -777,7 +777,7 @@
mbtk_sock_info *sock_info = NULL;
int rc = 0;
int errno;
-
+
sock_info = (mbtk_sock_info *)malloc(sizeof(mbtk_sock_info));
if(sock_info == NULL)
{
@@ -789,7 +789,7 @@
sock_info->is_support_ssl = is_support_ssl;
sock_info->ingnore_cert = ingnore_cert;
sock_info->type = MBTK_SOCK_UDP;
-
+
printf("host %s\nport %d\nis_support_ssl %d\ningnore_cert %d\n",sock_info->address,sock_info->port,sock_info->is_support_ssl,sock_info->ingnore_cert);
if(!coap_sock_inited)
@@ -918,7 +918,7 @@
pud_lenth,
type,
code,
- mesageId);
+ mesageId);
return 0;
}
@@ -959,7 +959,7 @@
int buffer_len = ecoap_recv_buffer(buff_data, data, data_len);
printf("recv buff_len:%d\n",buffer_len);
printf("buf:\n%s\r\n",buff_data);
-
+
LOGE("type:%X\n",type);
if(type == COAP_CONFIRMABLE) // Should ACK
{
@@ -1075,7 +1075,7 @@
(
char *ip_addr,
int port,
- bool is_support_ssl,
+ bool is_support_ssl,
bool ingnore_cert
)
{
@@ -1088,7 +1088,7 @@
}
ret = mbtk_ecoap_handle_sock_init(ip_addr, port, is_support_ssl, ingnore_cert);
-
+
return ret;
}
@@ -1099,7 +1099,7 @@
{
int result = 0;
int rx_mod = mode;
-
+
return result;
}
@@ -1120,7 +1120,7 @@
{
int result = 0;
int get_len = len;
-
+
return result;
}
@@ -1143,7 +1143,7 @@
{
int result = 0;
mbth_ecoap_package_ver.type = type;
-
+
return result;
}
@@ -1172,12 +1172,12 @@
{
int result = 0;
uint16 token_length = len;
- char * token = token_buf;
+ char * token = token_buf;
if(strlen(token) != token_length)
{
return -1;
}
-
+
mbth_ecoap_package_ver.token_len = token_length;
memcpy(mbth_ecoap_package_ver.token, token, strlen(token));
@@ -1190,7 +1190,7 @@
)
{
int result = 0;
- mbth_ecoap_package_ver.message_id = msg_id;
+ mbth_ecoap_package_ver.message_id = msg_id;
return result;
}
@@ -1289,7 +1289,7 @@
coap->token_len = mbth_ecoap_package_ver.token_len;
memcpy(coap->token, mbth_ecoap_package_ver.token, strlen((char *)mbth_ecoap_package_ver.token));
}
-
+
if(data_len > 0)
{
coap->payload_len = data_len;
@@ -1344,13 +1344,13 @@
{
return -1;
}
-
+
if(mbtk_ecoap_state <= MBTK_ECOAP_STATE_CLOSING )
{
mbtk_ecoap_show_error(MBTK_ECOAP_ERR_NO_OPEN);
return -1;
}
-
+
LOGE("del---------del_id:%d\n",del_id);
return result;
@@ -1378,4 +1378,8 @@
return result;
}
+void mbtk_coap_lib_info_print()
+{
+ MBTK_SOURCE_INFO_PRINT("mbtk_coap_lib");
+}