Changeset c1d9c95 for protocols/twitter
- Timestamp:
- 2012-12-24T22:02:41Z (12 years ago)
- Branches:
- master
- Children:
- 14d0b02
- Parents:
- 9b67285
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/twitter/twitter_lib.c
r9b67285 rc1d9c95 771 771 } 772 772 773 printf( "%d bytes in stream\n", req->body_size );774 775 773 /* MUST search for CRLF, not just LF: 776 774 https://dev.twitter.com/docs/streaming-apis/processing#Parsing_responses */ 777 nl = strstr(req->reply_body, "\r\n"); 778 779 if (!nl) { 780 printf("Incomplete data\n"); 781 return; 782 } 775 if (!(nl = strstr(req->reply_body, "\r\n"))) 776 return; 783 777 784 778 len = nl - req->reply_body; … … 787 781 req->reply_body[len] = '\0'; 788 782 789 printf("JSON: %s\n", req->reply_body);790 printf("parsed: %p\n", (parsed = json_parse(req->reply_body)));791 783 if (parsed) { 792 784 twitter_stream_handle_object(ic, parsed);
Note: See TracChangeset
for help on using the changeset viewer.