Ignore:
Timestamp:
2015-07-29T21:48:14Z (9 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Children:
69b94c3
Parents:
10d089d (diff), 73dd021 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge remote-tracking branch 'origin/develop' into parson

Conflicts:

lib/json.c - Yep, no longer exists in the branch so not important.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/sasl.c

    r10d089d r3ddbd23c  
    5454        struct xt_node *c, *reply;
    5555        char *s;
    56         int sup_plain = 0, sup_digest = 0, sup_gtalk = 0, sup_fb = 0;
    57         int want_oauth = FALSE, want_hipchat = FALSE;
     56        int sup_plain = 0, sup_digest = 0, sup_gtalk = 0, sup_fb = 0, sup_anonymous = 0;
     57        int want_oauth = FALSE, want_hipchat = FALSE, want_anonymous = FALSE;
    5858        GString *mechs;
    5959
     
    7474        }
    7575
     76        want_anonymous = set_getbool(&ic->acc->set, "anonymous");
    7677        want_oauth = set_getbool(&ic->acc->set, "oauth");
    7778        want_hipchat = (jd->flags & JFLAG_HIPCHAT);
     
    8485                } else if (c->text && g_strcasecmp(c->text, "DIGEST-MD5") == 0) {
    8586                        sup_digest = 1;
     87                } else if (c->text && g_strcasecmp(c->text, "ANONYMOUS") == 0) {
     88                        sup_anonymous = 1;
    8689                } else if (c->text && g_strcasecmp(c->text, "X-OAUTH2") == 0) {
    8790                        sup_gtalk = 1;
     
    139142        } else if (want_oauth) {
    140143                imcb_error(ic, "OAuth requested, but not supported by server");
     144                imc_logout(ic, FALSE);
     145                xt_free_node(reply);
     146                return XT_ABORT;
     147        } else if (want_anonymous && sup_anonymous) {
     148                xt_add_attr(reply, "mechanism", "ANONYMOUS");
     149
     150                /* Well, that was easy. */
     151        } else if (want_anonymous) {
     152                imcb_error(ic, "Anonymous login requested, but not supported by server");
    141153                imc_logout(ic, FALSE);
    142154                xt_free_node(reply);
Note: See TracChangeset for help on using the changeset viewer.