Changeset c1d9c95
- Timestamp:
- 2012-12-24T22:02:41Z (12 years ago)
- Branches:
- master
- Children:
- 14d0b02
- Parents:
- 9b67285
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/http_client.c
r9b67285 rc1d9c95 2 2 * BitlBee -- An IRC to other IM-networks gateway * 3 3 * * 4 * Copyright 2002-201 1Wilmer van der Gaast and others *4 * Copyright 2002-2012 Wilmer van der Gaast and others * 5 5 \********************************************************************/ 6 6 … … 578 578 if( req->reply_body - req->sbuf >= 512 ) 579 579 { 580 printf( "Wasting %ld bytes, cleaning up stream buffer\n", req->reply_body - req->sbuf );581 580 char *new = g_memdup( req->reply_body, req->body_size + 1 ); 582 581 g_free( req->sbuf ); -
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.