src/protocols/jabber/jabber.c

changeset 7310
1346a99cba40
parent 7291
3d8a237f36cb
child 7322
de15a9314c04
equal deleted inserted replaced
7309:d332a31a840f 7310:1346a99cba40
360 g_free, (GDestroyNotify)jabber_buddy_free); 360 g_free, (GDestroyNotify)jabber_buddy_free);
361 js->chats = g_hash_table_new_full(g_str_hash, g_str_equal, 361 js->chats = g_hash_table_new_full(g_str_hash, g_str_equal,
362 g_free, NULL); 362 g_free, NULL);
363 js->user = jabber_id_new(gaim_account_get_username(account)); 363 js->user = jabber_id_new(gaim_account_get_username(account));
364 364
365 if(!js->user) {
366 gaim_connection_error(gc, _("Invalid Jabber ID"));
367 return;
368 }
369
365 if(!js->user->resource) { 370 if(!js->user->resource) {
366 char *me; 371 char *me;
367 js->user->resource = g_strdup("Gaim"); 372 js->user->resource = g_strdup("Gaim");
368 if(!js->user->node) { 373 if(!js->user->node) {
369 js->user->node = js->user->domain; 374 js->user->node = js->user->domain;
648 js->registration = TRUE; 653 js->registration = TRUE;
649 js->callbacks = g_hash_table_new_full(g_str_hash, g_str_equal, 654 js->callbacks = g_hash_table_new_full(g_str_hash, g_str_equal,
650 g_free, NULL); 655 g_free, NULL);
651 js->user = jabber_id_new(gaim_account_get_username(account)); 656 js->user = jabber_id_new(gaim_account_get_username(account));
652 657
658 if(!js->user) {
659 gaim_connection_error(gc, _("Invalid Jabber ID"));
660 return;
661 }
662
653 if(!js->user->resource) { 663 if(!js->user->resource) {
654 char *me; 664 char *me;
655 js->user->resource = g_strdup("Gaim"); 665 js->user->resource = g_strdup("Gaim");
656 if(!js->user->node) { 666 if(!js->user->node) {
657 js->user->node = js->user->domain; 667 js->user->node = js->user->domain;

mercurial