From 57f81ec3befe532d0533938efcfc650d80310f61 Mon Sep 17 00:00:00 2001 From: dequis Date: Sun, 24 Jul 2016 14:57:19 -0300 Subject: purple: Don't try to init module if it's already initialized This only happens if the user has used / forced daemon mode (for example, when debugging with BITLBEE_DEBUG=1) --- protocols/purple/purple.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'protocols') diff --git a/protocols/purple/purple.c b/protocols/purple/purple.c index db553407..58484132 100644 --- a/protocols/purple/purple.c +++ b/protocols/purple/purple.c @@ -1446,6 +1446,12 @@ void purple_initmodule() GString *help; char *dir; + if (purple_get_core() != NULL) { + log_message(LOGLVL_ERROR, "libpurple already initialized. " + "Please use inetd or ForkDaemon mode instead."); + return; + } + g_assert((int) B_EV_IO_READ == (int) PURPLE_INPUT_READ); g_assert((int) B_EV_IO_WRITE == (int) PURPLE_INPUT_WRITE); -- cgit v1.2.3 From dc45a85c1996169df4517dc9bb7f7368cb176de5 Mon Sep 17 00:00:00 2001 From: dequis Date: Mon, 25 Jul 2016 04:39:10 -0300 Subject: twitter: don't hard-fail with mutes or noretweets (for "identica") Fixes trac ticket 1254 Kinda dirty but better than keeping it broken. --- protocols/twitter/twitter_lib.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'protocols') diff --git a/protocols/twitter/twitter_lib.c b/protocols/twitter/twitter_lib.c index 77f487ae..41d95db8 100644 --- a/protocols/twitter/twitter_lib.c +++ b/protocols/twitter/twitter_lib.c @@ -383,6 +383,11 @@ static void twitter_http_get_mutes_ids(struct http_request *req) td = ic->proto_data; + if (req->status_code != 200) { + /* Fail silently */ + return; + } + // Parse the data. if (!(parsed = twitter_parse_response(ic, req))) { return; @@ -421,6 +426,11 @@ static void twitter_http_get_noretweets_ids(struct http_request *req) return; } + if (req->status_code != 200) { + /* Fail silently */ + return; + } + td = ic->proto_data; // Parse the data. -- cgit v1.2.3