libpurple/protocols/jabber/jabber.c

changeset 16847
cd87fc9c6856
parent 16799
349ba03a78dc
child 16961
b6955f946f8f
equal deleted inserted replaced
16846:d565955c55ae 16847:cd87fc9c6856
1028 gc->proto_data = NULL; 1028 gc->proto_data = NULL;
1029 } 1029 }
1030 1030
1031 void jabber_stream_set_state(JabberStream *js, JabberStreamState state) 1031 void jabber_stream_set_state(JabberStream *js, JabberStreamState state)
1032 { 1032 {
1033 PurpleStoredImage *img;
1034
1033 js->state = state; 1035 js->state = state;
1034 switch(state) { 1036 switch(state) {
1035 case JABBER_STREAM_OFFLINE: 1037 case JABBER_STREAM_OFFLINE:
1036 break; 1038 break;
1037 case JABBER_STREAM_CONNECTING: 1039 case JABBER_STREAM_CONNECTING:
1053 } 1055 }
1054 break; 1056 break;
1055 case JABBER_STREAM_REINITIALIZING: 1057 case JABBER_STREAM_REINITIALIZING:
1056 purple_connection_update_progress(js->gc, _("Re-initializing Stream"), 1058 purple_connection_update_progress(js->gc, _("Re-initializing Stream"),
1057 (js->gsc ? 7 : 4), JABBER_CONNECT_STEPS); 1059 (js->gsc ? 7 : 4), JABBER_CONNECT_STEPS);
1058 1060
1059 /* The stream will be reinitialized later, in jabber_recv_cb_ssl() */ 1061 /* The stream will be reinitialized later, in jabber_recv_cb_ssl() */
1060 js->reinit = TRUE; 1062 js->reinit = TRUE;
1061 1063
1062 break; 1064 break;
1063 case JABBER_STREAM_CONNECTED: 1065 case JABBER_STREAM_CONNECTED:
1066 /* lets make sure our buddy icon is up to date
1067 * before we go letting people know we're here */
1068 img = purple_buddy_icons_find_account_icon(js->gc->account);
1069 jabber_set_buddy_icon(js->gc, img);
1070 purple_imgstore_unref(img);
1071
1072 /* now we can alert the core that we're ready to send status */
1064 purple_connection_set_state(js->gc, PURPLE_CONNECTED); 1073 purple_connection_set_state(js->gc, PURPLE_CONNECTED);
1065 jabber_disco_items_server(js); 1074 jabber_disco_items_server(js);
1066 break; 1075 break;
1067 } 1076 }
1068 } 1077 }

mercurial