Mercurial > pidgin
comparison src/prpl.c @ 12108:1d4fbf553ce2
[gaim-migrate @ 14408]
A patch from Sadrul
"when you set an account to offline while it is "connecting", it
doesn't disconnect. marv hit on this last night"
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Wed, 16 Nov 2005 00:01:23 +0000 |
parents | fd456a3275a8 |
children | 35c4797c5c57 |
comparison
equal
deleted
inserted
replaced
12107:40724851e95e | 12108:1d4fbf553ce2 |
---|---|
287 | 287 |
288 g_return_if_fail(account != NULL); | 288 g_return_if_fail(account != NULL); |
289 g_return_if_fail(old_status != NULL); | 289 g_return_if_fail(old_status != NULL); |
290 g_return_if_fail(new_status != NULL); | 290 g_return_if_fail(new_status != NULL); |
291 | 291 |
292 if (gaim_status_is_online(new_status) && | |
293 gaim_account_is_disconnected(account)) | |
294 { | |
295 gaim_account_connect(account); | |
296 return; | |
297 } | |
298 | |
299 if (!gaim_status_is_online(new_status)) | |
300 { | |
301 if (!gaim_account_is_disconnected(account)) | |
302 gaim_account_disconnect(account); | |
303 return; | |
304 } | |
305 | |
292 if (gaim_account_is_connecting(account)) | 306 if (gaim_account_is_connecting(account)) |
293 /* | 307 /* |
294 * We don't need to call the set_status PRPL function because | 308 * We don't need to call the set_status PRPL function because |
295 * the PRPL will take care of setting its status during the | 309 * the PRPL will take care of setting its status during the |
296 * connection process. | 310 * connection process. |
297 */ | 311 */ |
298 return; | 312 return; |
299 | 313 |
300 if (gaim_status_is_online(new_status) && | |
301 gaim_account_is_disconnected(account)) | |
302 { | |
303 gaim_account_connect(account); | |
304 return; | |
305 } | |
306 | |
307 if (!gaim_status_is_online(new_status)) | |
308 { | |
309 if (!gaim_account_is_disconnected(account)) | |
310 gaim_account_disconnect(account); | |
311 return; | |
312 } | |
313 | |
314 prpl = gaim_find_prpl(gaim_account_get_protocol_id(account)); | 314 prpl = gaim_find_prpl(gaim_account_get_protocol_id(account)); |
315 | 315 |
316 if (prpl == NULL) | 316 if (prpl == NULL) |
317 return; | 317 return; |
318 | 318 |