Changeset 72d661e for protocols


Ignore:
Timestamp:
2015-10-21T08:46:02Z (9 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
2b0c05c
Parents:
5307e88
Message:

yahoo: Fix handling of proxy connection failures

Fixes trac ticket 135, https://bugs.bitlbee.org/bitlbee/ticket/135

The ticket mentions 100% cpu usage when failing to connect to a socks
proxy. It also provides a patch that just checks source == -1 and
disconnects cleanly instead of trying to continue logging in.

This commit is pretty much the same thing, adapted to the API we're
currently using, since the original patch was for bitlbee 1.0.1 and it
looks like the old api was terrible back then.

That ticket was almost 10 years old. The yahoo code didn't change a lot
in that time.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/yahoo/yahoo.c

    r5307e88 r72d661e  
    440440{
    441441        struct byahoo_connect_callback_data *d = data;
    442 
    443         if (!byahoo_get_ic_by_id(d->id)) {
     442        struct im_connection *ic;
     443
     444        if (!(ic = byahoo_get_ic_by_id(d->id))) {
     445                g_free(d);
     446                return;
     447        }
     448
     449        if (source == -1) {
     450                imcb_error(ic, "Could not connect to server");
     451                imc_logout(ic, TRUE);
    444452                g_free(d);
    445453                return;
Note: See TracChangeset for help on using the changeset viewer.