comparison src/prpl.c @ 14162:cef7f6a93592

[gaim-migrate @ 16810] sf patch #1541754, from Sadrul Habib Chowdhury "Setting an account to 'offline' while it is connecting doesn't cause the connection to stop. This patch fixes that." committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 17 Aug 2006 06:21:28 +0000
parents 8bda65b88e49
children
comparison
equal deleted inserted replaced
14161:694aae55ab6d 14162:cef7f6a93592
169 { 169 {
170 gaim_account_connect(account); 170 gaim_account_connect(account);
171 return; 171 return;
172 } 172 }
173 173
174 if (!gaim_status_is_online(new_status))
175 {
176 if (!gaim_account_is_disconnected(account))
177 gaim_account_disconnect(account);
178 return;
179 }
174 180
175 if (gaim_account_is_connecting(account)) 181 if (gaim_account_is_connecting(account))
176 /* 182 /*
177 * We don't need to call the set_status PRPL function because 183 * We don't need to call the set_status PRPL function because
178 * the PRPL will take care of setting its status during the 184 * the PRPL will take care of setting its status during the
189 195
190 if (!gaim_account_is_disconnected(account) && prpl_info->set_status != NULL) 196 if (!gaim_account_is_disconnected(account) && prpl_info->set_status != NULL)
191 { 197 {
192 prpl_info->set_status(account, new_status); 198 prpl_info->set_status(account, new_status);
193 } 199 }
194
195 if (!gaim_status_is_online(new_status))
196 {
197 if (!gaim_account_is_disconnected(account))
198 gaim_account_disconnect(account);
199 return;
200 }
201 } 200 }
202 201
203 void 202 void
204 gaim_prpl_change_account_status(GaimAccount *account, 203 gaim_prpl_change_account_status(GaimAccount *account,
205 GaimStatus *old_status, GaimStatus *new_status) 204 GaimStatus *old_status, GaimStatus *new_status)