Ignore:
Timestamp:
2007-04-15T22:39:35Z (17 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
84b045d
Parents:
cd4723c
Message:

Cleaned up struct im_connection. No more username/password stuff since
it's in acc too. wants_to_die is now an argument to imc_logout().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/oscar/oscar.c

    rcd4723c rc2fb3809  
    263263                        aim_rxdispatch(odata->sess);
    264264                               if (odata->killme)
    265                                        imc_logout(ic);
     265                                       imc_logout(ic, TRUE);
    266266                } else {
    267267                        if ((conn->type == AIM_CONN_TYPE_BOS) ||
    268268                                   !(aim_getconn_type(odata->sess, AIM_CONN_TYPE_BOS))) {
    269269                                imc_error(ic, _("Disconnected."));
    270                                 imc_logout(ic);
     270                                imc_logout(ic, TRUE);
    271271                        } else if (conn->type == AIM_CONN_TYPE_CHAT) {
    272272                                struct chat_connection *c = find_oscar_chat_by_conn(ic, conn);
     
    326326        if (source < 0) {
    327327                imc_error(ic, _("Couldn't connect to host"));
    328                 imc_logout(ic);
     328                imc_logout(ic, TRUE);
    329329                return FALSE;
    330330        }
     
    361361                   We don't do those anymore, but let's stick with it, just in case
    362362                   it accidentally fixes something else too... </bitlbee> */
    363                 ic->password[8] = 0;
     363                /* ic->acc->pass[8] = 0;
     364                   Not touching this anymore now that it belongs to account_t!
     365                   Let's hope nothing will break. ;-) */
    364366        } else {
    365367                ic->flags |= OPT_CONN_HTML;
     
    379381        if (conn == NULL) {
    380382                imc_error(ic, _("Unable to login to AIM"));
    381                 imc_logout(ic);
     383                imc_logout(ic, TRUE);
    382384                return;
    383385        }
     
    385387        if (acc->server == NULL) {
    386388                imc_error(ic, "No servername specified");
    387                 imc_logout(ic);
     389                imc_logout(ic, FALSE);
    388390                return;
    389391        }
     
    394396        }
    395397       
    396         imc_log(ic, _("Signon: %s"), ic->username);
     398        imc_log(ic, _("Signon: %s"), ic->acc->user);
    397399
    398400        aim_conn_addhandler(sess, conn, 0x0017, 0x0007, gaim_parse_login, 0);
     
    403405        if (conn->fd < 0) {
    404406                imc_error(ic, _("Couldn't connect to host"));
    405                 imc_logout(ic);
     407                imc_logout(ic, TRUE);
    406408                return;
    407409        }
    408         aim_request_login(sess, conn, ic->username);
     410        aim_request_login(sess, conn, ic->acc->user);
    409411}
    410412
     
    463465        if (source < 0) {
    464466                imc_error(ic, _("Could Not Connect"));
    465                 imc_logout(ic);
     467                imc_logout(ic, TRUE);
    466468                return FALSE;
    467469        }
     
    728730        va_end(ap);
    729731
    730         aim_send_login(sess, fr->conn, ic->username, ic->password, &info, key);
     732        aim_send_login(sess, fr->conn, ic->acc->user, ic->acc->pass, &info, key);
    731733
    732734        return 1;
     
    10131015                signon = time(NULL) - info->sessionlen;
    10141016
    1015         tmp = g_strdup(normalize(ic->username));
     1017        tmp = g_strdup(normalize(ic->acc->user));
    10161018        if (!strcmp(tmp, normalize(info->sn)))
    10171019                g_snprintf(ic->displayname, sizeof(ic->displayname), "%s", info->sn);
     
    21362138                switch(ic->permdeny) {
    21372139                case 1:
    2138                         aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_DENYADD, ic->username);
     2140                        aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_DENYADD, ic->acc->user);
    21392141                        break;
    21402142                case 2:
    2141                         aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_PERMITADD, ic->username);
     2143                        aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_PERMITADD, ic->acc->user);
    21422144                        break;
    21432145                case 3:
     
    21622164                        break;
    21632165                }
    2164                 signoff_blocked(ic);
    21652166        } else {
    21662167                if (od->sess->ssi.received_data)
     
    25842585        char * chatname;
    25852586       
    2586         chatname = g_strdup_printf("%s%d", ic->username, chat_id++);
     2587        chatname = g_strdup_printf("%s%d", ic->acc->user, chat_id++);
    25872588 
    25882589        ret = oscar_chat_join(ic, chatname);
Note: See TracChangeset for help on using the changeset viewer.