Commit c529d56a authored by funshine's avatar funshine
Browse files

minor fix to debug mode

parent 3077990a
...@@ -51,12 +51,12 @@ void coap_client_response_handler(char *data, unsigned short len, unsigned short ...@@ -51,12 +51,12 @@ void coap_client_response_handler(char *data, unsigned short len, unsigned short
{ {
/* There is no block option set, just read the data and we are done. */ /* There is no block option set, just read the data and we are done. */
NODE_DBG("%d.%02d\t", (pkt.hdr.code >> 5), pkt.hdr.code & 0x1F); NODE_DBG("%d.%02d\t", (pkt.hdr.code >> 5), pkt.hdr.code & 0x1F);
NODE_DBG(pkt.payload.p); NODE_DBG((char *)(pkt.payload.p));
} }
else if (COAP_RESPONSE_CLASS(pkt.hdr.code) >= 4) else if (COAP_RESPONSE_CLASS(pkt.hdr.code) >= 4)
{ {
NODE_DBG("%d.%02d\t", (pkt.hdr.code >> 5), pkt.hdr.code & 0x1F); NODE_DBG("%d.%02d\t", (pkt.hdr.code >> 5), pkt.hdr.code & 0x1F);
NODE_DBG(pkt.payload.p); NODE_DBG((char *)(pkt.payload.p));
} }
} }
......
...@@ -48,7 +48,7 @@ static int handle_get_variable(const coap_endpoint_t *ep, coap_rw_buffer_t *scra ...@@ -48,7 +48,7 @@ static int handle_get_variable(const coap_endpoint_t *ep, coap_rw_buffer_t *scra
if (0 == c_memcmp(h->name, opt[count-1].buf.p, opt[count-1].buf.len)) if (0 == c_memcmp(h->name, opt[count-1].buf.p, opt[count-1].buf.len))
{ {
NODE_DBG("/v1/v/"); NODE_DBG("/v1/v/");
NODE_DBG(h->name); NODE_DBG((char *)h->name);
NODE_DBG(" match.\n"); NODE_DBG(" match.\n");
if(h->L == NULL) if(h->L == NULL)
return coap_make_response(scratch, outpkt, NULL, 0, id_hi, id_lo, &inpkt->tok, COAP_RSPCODE_NOT_FOUND, COAP_CONTENTTYPE_NONE); return coap_make_response(scratch, outpkt, NULL, 0, id_hi, id_lo, &inpkt->tok, COAP_RSPCODE_NOT_FOUND, COAP_CONTENTTYPE_NONE);
...@@ -103,7 +103,7 @@ static int handle_post_function(const coap_endpoint_t *ep, coap_rw_buffer_t *scr ...@@ -103,7 +103,7 @@ static int handle_post_function(const coap_endpoint_t *ep, coap_rw_buffer_t *scr
if (0 == c_memcmp(h->name, opt[count-1].buf.p, opt[count-1].buf.len)) if (0 == c_memcmp(h->name, opt[count-1].buf.p, opt[count-1].buf.len))
{ {
NODE_DBG("/v1/f/"); NODE_DBG("/v1/f/");
NODE_DBG(h->name); NODE_DBG((char *)h->name);
NODE_DBG(" match.\n"); NODE_DBG(" match.\n");
if(h->L == NULL) if(h->L == NULL)
...@@ -128,7 +128,7 @@ static int handle_post_function(const coap_endpoint_t *ep, coap_rw_buffer_t *scr ...@@ -128,7 +128,7 @@ static int handle_post_function(const coap_endpoint_t *ep, coap_rw_buffer_t *scr
luaL_error( h->L, "return string:<MAX_PAYLOAD_SIZE" ); luaL_error( h->L, "return string:<MAX_PAYLOAD_SIZE" );
return coap_make_response(scratch, outpkt, NULL, 0, id_hi, id_lo, &inpkt->tok, COAP_RSPCODE_NOT_FOUND, COAP_CONTENTTYPE_NONE); return coap_make_response(scratch, outpkt, NULL, 0, id_hi, id_lo, &inpkt->tok, COAP_RSPCODE_NOT_FOUND, COAP_CONTENTTYPE_NONE);
} }
NODE_DBG(ret); NODE_DBG((char *)ret);
NODE_DBG("\n"); NODE_DBG("\n");
return coap_make_response(scratch, outpkt, ret, len, id_hi, id_lo, &inpkt->tok, COAP_RSPCODE_CONTENT, COAP_CONTENTTYPE_TEXT_PLAIN); return coap_make_response(scratch, outpkt, ret, len, id_hi, id_lo, &inpkt->tok, COAP_RSPCODE_CONTENT, COAP_CONTENTTYPE_TEXT_PLAIN);
} }
......
...@@ -292,12 +292,12 @@ static void coap_response_handler(void *arg, char *pdata, unsigned short len) ...@@ -292,12 +292,12 @@ static void coap_response_handler(void *arg, char *pdata, unsigned short len)
{ {
/* There is no block option set, just read the data and we are done. */ /* There is no block option set, just read the data and we are done. */
NODE_DBG("%d.%02d\t", (pkt.hdr.code >> 5), pkt.hdr.code & 0x1F); NODE_DBG("%d.%02d\t", (pkt.hdr.code >> 5), pkt.hdr.code & 0x1F);
NODE_DBG(pkt.payload.p); NODE_DBG((char *)pkt.payload.p);
} }
else if (COAP_RESPONSE_CLASS(pkt.hdr.code) >= 4) else if (COAP_RESPONSE_CLASS(pkt.hdr.code) >= 4)
{ {
NODE_DBG("%d.%02d\t", (pkt.hdr.code >> 5), pkt.hdr.code & 0x1F); NODE_DBG("%d.%02d\t", (pkt.hdr.code >> 5), pkt.hdr.code & 0x1F);
NODE_DBG(pkt.payload.p); NODE_DBG((char *)pkt.payload.p);
} }
} }
......
...@@ -5,7 +5,7 @@ MEMORY ...@@ -5,7 +5,7 @@ MEMORY
dport0_0_seg : org = 0x3FF00000, len = 0x10 dport0_0_seg : org = 0x3FF00000, len = 0x10
dram0_0_seg : org = 0x3FFE8000, len = 0x14000 dram0_0_seg : org = 0x3FFE8000, len = 0x14000
iram1_0_seg : org = 0x40100000, len = 0x8000 iram1_0_seg : org = 0x40100000, len = 0x8000
irom0_0_seg : org = 0x40210000, len = 0x54000 irom0_0_seg : org = 0x40210000, len = 0x60000
} }
PHDRS PHDRS
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment