Mercurial > pidgin.yaz
comparison src/protocols/simple/simple.c @ 11718:11e95968c9ff
[gaim-migrate @ 14009]
PRPLs are no longer required to call gaim_account_connect() and
gaim_account_disconnect()--it is done in the core. Having the PRPLs
do it was kind of silly. And this should allow me to improve the
auto-reconnect plugin some. I think.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 22 Oct 2005 20:09:24 +0000 |
parents | 20edc3a05317 |
children | fa742ad8068c |
comparison
equal
deleted
inserted
replaced
11717:84d1145522c2 | 11718:11e95968c9ff |
---|---|
106 } | 106 } |
107 | 107 |
108 static void simple_set_status(GaimAccount *account, GaimStatus *status) { | 108 static void simple_set_status(GaimAccount *account, GaimStatus *status) { |
109 GaimStatusPrimitive primitive = gaim_status_type_get_primitive(gaim_status_get_type(status)); | 109 GaimStatusPrimitive primitive = gaim_status_type_get_primitive(gaim_status_get_type(status)); |
110 struct simple_account_data *sip = NULL; | 110 struct simple_account_data *sip = NULL; |
111 | |
111 if (!gaim_status_is_active(status)) | 112 if (!gaim_status_is_active(status)) |
112 return; | 113 return; |
113 | 114 |
114 if(account->gc) sip = account->gc->proto_data; | 115 if (account->gc) |
115 if(sip) { | 116 sip = account->gc->proto_data; |
117 | |
118 if (sip) | |
119 { | |
116 g_free(sip->status); | 120 g_free(sip->status); |
117 if(primitive == GAIM_STATUS_AVAILABLE) sip->status = g_strdup("available"); | 121 if (primitive == GAIM_STATUS_AVAILABLE) |
118 else sip->status = g_strdup("busy"); | 122 sip->status = g_strdup("available"); |
123 else | |
124 sip->status = g_strdup("busy"); | |
119 | 125 |
120 do_notifies(sip); | 126 do_notifies(sip); |
121 } | |
122 if ((primitive != GAIM_STATUS_OFFLINE) | |
123 && (!gaim_account_is_connected(account))) { | |
124 gaim_account_connect(account); | |
125 } | 127 } |
126 } | 128 } |
127 | 129 |
128 static struct sip_connection *connection_find(struct simple_account_data *sip, int fd) { | 130 static struct sip_connection *connection_find(struct simple_account_data *sip, int fd) { |
129 struct sip_connection *ret = NULL; | 131 struct sip_connection *ret = NULL; |