aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/events_glib.c8
-rw-r--r--lib/oauth2.c10
2 files changed, 12 insertions, 6 deletions
diff --git a/lib/events_glib.c b/lib/events_glib.c
index 404031e8..dca704e1 100644
--- a/lib/events_glib.c
+++ b/lib/events_glib.c
@@ -81,7 +81,7 @@ static gboolean gaim_io_invoke(GIOChannel *source, GIOCondition condition, gpoin
gaim_cond |= B_EV_IO_WRITE;
}
- event_debug("gaim_io_invoke( %d, %d, 0x%x )\n", g_io_channel_unix_get_fd(source), condition, data);
+ event_debug("gaim_io_invoke( %d, %d, %p )\n", g_io_channel_unix_get_fd(source), condition, data);
st = closure->function(closure->data, g_io_channel_unix_get_fd(source), gaim_cond);
@@ -100,7 +100,7 @@ static gboolean gaim_io_invoke(GIOChannel *source, GIOCondition condition, gpoin
static void gaim_io_destroy(gpointer data)
{
- event_debug("gaim_io_destroy( 0x%x )\n", data);
+ event_debug("gaim_io_destroy( 0%p )\n", data);
g_free(data);
}
@@ -126,7 +126,7 @@ gint b_input_add(gint source, b_input_condition condition, b_event_handler funct
st = g_io_add_watch_full(channel, G_PRIORITY_DEFAULT, cond,
gaim_io_invoke, closure, gaim_io_destroy);
- event_debug("b_input_add( %d, %d, 0x%x, 0x%x ) = %d (%p)\n", source, condition, function, data, st, closure);
+ event_debug("b_input_add( %d, %d, %p, %p ) = %d (%p)\n", source, condition, function, data, st, closure);
g_io_channel_unref(channel);
return st;
@@ -139,7 +139,7 @@ gint b_timeout_add(gint timeout, b_event_handler func, gpointer data)
for now, BitlBee only looks at the "data" argument. */
gint st = g_timeout_add(timeout, (GSourceFunc) func, data);
- event_debug("b_timeout_add( %d, %d, %d ) = %d\n", timeout, func, data, st);
+ event_debug("b_timeout_add( %d, %p, %p ) = %d\n", timeout, func, data, st);
return st;
}
diff --git a/lib/oauth2.c b/lib/oauth2.c
index d6cf9a53..f9acd6c8 100644
--- a/lib/oauth2.c
+++ b/lib/oauth2.c
@@ -139,9 +139,15 @@ static void oauth2_access_token_done(struct http_request *req)
{
struct oauth2_access_token_data *cb_data = req->data;
char *atoken = NULL, *rtoken = NULL, *error = NULL;
- char *content_type;
+ char *content_type = NULL;
- if (getenv("BITLBEE_DEBUG") && req->reply_body) {
+ if (req->status_code <= 0 && !req->reply_body) {
+ cb_data->func(cb_data->data, NULL, NULL, req->status_string);
+ g_free(cb_data);
+ return;
+ }
+
+ if (getenv("BITLBEE_DEBUG")) {
printf("%s\n", req->reply_body);
}