diff --git a/Project/applications/smartcities/buffer.c b/Project/applications/smartcities/buffer.c index 0b5aee1..53d95ea 100644 --- a/Project/applications/smartcities/buffer.c +++ b/Project/applications/smartcities/buffer.c @@ -7,15 +7,20 @@ uint32_t i,len; len=*buf_len; if(len==*index) { - + printf("Joining buffer...\r\n"); char** buffer=join_buf(buf, buf_len); + printf("Joined buffer...\r\n"); buffer[*index]=chHeapAlloc(NULL,strlen(info)+1); + printf("Memory allocated...\r\n"); strcpy(buffer[*index],info); + printf("Data copied...\r\n"); i=*index+1; *index = i; return buffer; } -else{ +else +{ + printf("WTF in put_message\r\n"); buf[*index] = chHeapAlloc(NULL,strlen(info)+1); buf[*index]=info; i=*index+1; @@ -81,13 +86,20 @@ char** join_buf(char** buf, uint32_t *buf_len){ int len= *buf_len; n_buf=chHeapAlloc (NULL,sizeof (char *) * (len+1)); int i; + printf("Start buffer join...\r\n"); for(i=0; i