Changeset 0a3c243 for protocols/jabber


Ignore:
Timestamp:
2006-06-30T23:18:56Z (18 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
5100caa
Parents:
5c9512f
Message:

Got rid of struct aim_user (now using account_t everywhere). Needs some more
testing though.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/jabber.c

    r5c9512f r0a3c243  
    561561static void gjab_start(gjconn gjc)
    562562{
    563         struct aim_user *user;
     563        account_t *acc;
    564564        int port = -1, ssl = 0;
    565565        char *server = NULL, *s;
     
    568568                return;
    569569
    570         user = GJ_GC(gjc)->user;
    571         if (*user->proto_opt[0]) {
     570        acc = GJ_GC(gjc)->acc;
     571        if (acc->server) {
    572572                /* If there's a dot, assume there's a hostname in the beginning */
    573                 if (strchr(user->proto_opt[0], '.')) {
    574                         server = g_strdup(user->proto_opt[0]);
     573                if (strchr(acc->server, '.')) {
     574                        server = g_strdup(acc->server);
    575575                        if ((s = strchr(server, ':')))
    576576                                *s = 0;
     
    578578               
    579579                /* After the hostname, there can be a port number */
    580                 s = strchr(user->proto_opt[0], ':');
     580                s = strchr(acc->server, ':');
    581581                if (s && isdigit(s[1]))
    582582                        sscanf(s + 1, "%d", &port);
    583583               
    584584                /* And if there's the string ssl, the user wants an SSL-connection */
    585                 if (strstr(user->proto_opt[0], ":ssl") || g_strcasecmp(user->proto_opt[0], "ssl") == 0)
     585                if (strstr(acc->server, ":ssl") || g_strcasecmp(acc->server, "ssl") == 0)
    586586                        ssl = 1;
    587587        }
     
    616616        g_free(server);
    617617       
    618         if (!user->gc || (gjc->fd < 0)) {
     618        if (!acc->gc || (gjc->fd < 0)) {
    619619                STATE_EVT(JCONN_STATE_OFF)
    620620                return;
     
    15161516}
    15171517
    1518 static void jabber_login(struct aim_user *user)
    1519 {
    1520         struct gaim_connection *gc = new_gaim_conn(user);
     1518static void jabber_login(account_t *acc)
     1519{
     1520        struct gaim_connection *gc = new_gaim_conn(acc);
    15211521        struct jabber_data *jd = gc->proto_data = g_new0(struct jabber_data, 1);
    1522         char *loginname = create_valid_jid(user->username, DEFAULT_SERVER, "BitlBee");
     1522        char *loginname = create_valid_jid(acc->user, DEFAULT_SERVER, "BitlBee");
    15231523
    15241524        jd->hash = g_hash_table_new(g_str_hash, g_str_equal);
     
    15271527        set_login_progress(gc, 1, _("Connecting"));
    15281528
    1529         if (!(jd->gjc = gjab_new(loginname, user->password, gc))) {
     1529        if (!(jd->gjc = gjab_new(loginname, acc->pass, gc))) {
    15301530                g_free(loginname);
    15311531                hide_login_progress(gc, _("Unable to connect"));
Note: See TracChangeset for help on using the changeset viewer.