diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2012-12-24 23:02:41 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2012-12-24 23:02:41 +0100 |
commit | c1d9c952063904cc492d9538bdd8b75b20c41cd7 (patch) | |
tree | bee202119a8cf383e660385a9e536ac4f76a6aab | |
parent | 9b672857d1d395307f1bfac988a347d724e13eee (diff) |
Whoops, remove those debugging printfs as I intended to do before merging.
-rw-r--r-- | lib/http_client.c | 3 | ||||
-rw-r--r-- | protocols/twitter/twitter_lib.c | 10 |
2 files changed, 2 insertions, 11 deletions
diff --git a/lib/http_client.c b/lib/http_client.c index e368c0dc..b384e1f0 100644 --- a/lib/http_client.c +++ b/lib/http_client.c @@ -1,7 +1,7 @@ /********************************************************************\ * BitlBee -- An IRC to other IM-networks gateway * * * - * Copyright 2002-2011 Wilmer van der Gaast and others * + * Copyright 2002-2012 Wilmer van der Gaast and others * \********************************************************************/ /* HTTP(S) module */ @@ -577,7 +577,6 @@ void http_flush_bytes( struct http_request *req, size_t len ) if( req->reply_body - req->sbuf >= 512 ) { - printf( "Wasting %ld bytes, cleaning up stream buffer\n", req->reply_body - req->sbuf ); char *new = g_memdup( req->reply_body, req->body_size + 1 ); g_free( req->sbuf ); req->reply_body = req->sbuf = new; diff --git a/protocols/twitter/twitter_lib.c b/protocols/twitter/twitter_lib.c index 3d368d2e..3ff4b8fc 100644 --- a/protocols/twitter/twitter_lib.c +++ b/protocols/twitter/twitter_lib.c @@ -770,24 +770,16 @@ static void twitter_http_stream(struct http_request *req) return; } - printf( "%d bytes in stream\n", req->body_size ); - /* MUST search for CRLF, not just LF: https://dev.twitter.com/docs/streaming-apis/processing#Parsing_responses */ - nl = strstr(req->reply_body, "\r\n"); - - if (!nl) { - printf("Incomplete data\n"); + if (!(nl = strstr(req->reply_body, "\r\n"))) return; - } len = nl - req->reply_body; if (len > 0) { c = req->reply_body[len]; req->reply_body[len] = '\0'; - printf("JSON: %s\n", req->reply_body); - printf("parsed: %p\n", (parsed = json_parse(req->reply_body))); if (parsed) { twitter_stream_handle_object(ic, parsed); } |