/soc/2015/jgeboski/facebook: 305f27dd23c0: facebook: fixed dumpi...
James Geboski
jgeboski at gmail.com
Mon Jul 13 12:58:02 EDT 2015
Changeset: 305f27dd23c0d1d319a93ff66fb271b2ab4eec0d
Author: James Geboski <jgeboski at gmail.com>
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);
}
More information about the Commits
mailing list