Changeset 0a3c243 for protocols/jabber
- Timestamp:
- 2006-06-30T23:18:56Z (18 years ago)
- Branches:
- master
- Children:
- 5100caa
- Parents:
- 5c9512f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/jabber.c
r5c9512f r0a3c243 561 561 static void gjab_start(gjconn gjc) 562 562 { 563 struct aim_user *user;563 account_t *acc; 564 564 int port = -1, ssl = 0; 565 565 char *server = NULL, *s; … … 568 568 return; 569 569 570 user = GJ_GC(gjc)->user;571 if ( *user->proto_opt[0]) {570 acc = GJ_GC(gjc)->acc; 571 if (acc->server) { 572 572 /* 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); 575 575 if ((s = strchr(server, ':'))) 576 576 *s = 0; … … 578 578 579 579 /* After the hostname, there can be a port number */ 580 s = strchr( user->proto_opt[0], ':');580 s = strchr(acc->server, ':'); 581 581 if (s && isdigit(s[1])) 582 582 sscanf(s + 1, "%d", &port); 583 583 584 584 /* 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) 586 586 ssl = 1; 587 587 } … … 616 616 g_free(server); 617 617 618 if (! user->gc || (gjc->fd < 0)) {618 if (!acc->gc || (gjc->fd < 0)) { 619 619 STATE_EVT(JCONN_STATE_OFF) 620 620 return; … … 1516 1516 } 1517 1517 1518 static void jabber_login( struct aim_user *user)1519 { 1520 struct gaim_connection *gc = new_gaim_conn( user);1518 static void jabber_login(account_t *acc) 1519 { 1520 struct gaim_connection *gc = new_gaim_conn(acc); 1521 1521 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"); 1523 1523 1524 1524 jd->hash = g_hash_table_new(g_str_hash, g_str_equal); … … 1527 1527 set_login_progress(gc, 1, _("Connecting")); 1528 1528 1529 if (!(jd->gjc = gjab_new(loginname, user->password, gc))) {1529 if (!(jd->gjc = gjab_new(loginname, acc->pass, gc))) { 1530 1530 g_free(loginname); 1531 1531 hide_login_progress(gc, _("Unable to connect"));
Note: See TracChangeset
for help on using the changeset viewer.