/soc/2015/jgeboski/facebook: 305f27dd23c0: facebook: fixed dumpi...

James Geboski <[email protected]>
Newsgroups gmane.comp.gnome.gaim.cvs
Message-ID <[email protected]>
Changeset: 305f27dd23c0d1d319a93ff66fb271b2ab4eec0d
Author:	 James Geboski <[email protected]>
Date:	 2015-07-13 12:57 -0400
Branch:	 facebook
URL: https://hg.pidgin.im/soc/2015/jgeboski/facebook/rev/305f27dd23c0

Description:

facebook: fixed dumping of empty HTTP data

diffstat:

 libpurple/protocols/facebook/api.c |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (18 lines):

diff --git a/libpurple/protocols/facebook/api.c b/libpurple/protocols/facebook/api.c
--- a/libpurple/protocols/facebook/api.c
+++ b/libpurple/protocols/facebook/api.c
@@ -375,9 +375,13 @@ fb_api_http_chk(FbApi *api, PurpleHttpCo
 
 	fb_util_debug(FB_UTIL_DEBUG_INFO, "HTTP Response (%p):", con);
 	fb_util_debug(FB_UTIL_DEBUG_INFO, "  Response Error: %s", emsg);
-	fb_util_debug(FB_UTIL_DEBUG_INFO, "  Response Data: %s", data);
 	g_free(emsg);
 
+	if (G_LIKELY(size > 0)) {
+		fb_util_debug(FB_UTIL_DEBUG_INFO, "  Response Data: %.*s",
+		              (gint) size, data);
+	}
+
 	if (!fb_http_error_chk(res, &err)) {
 		FB_API_ERROR_CHK(api, err, return FALSE);
 	}

_______________________________________________
Commits mailing list
[email protected]
https://pidgin.im/cgi-bin/mailman/listinfo/commits
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.