mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-06 03:25:31 +00:00
sip: origin: Make go_online() a no-op in the direct connection case
This avoids some special casing in init_sip_account()
This commit is contained in:
parent
6d877fd9d3
commit
d5fd098479
1 changed files with 6 additions and 3 deletions
|
@ -913,6 +913,9 @@ go_online (CallsAccount *account,
|
|||
|
||||
self = CALLS_SIP_ORIGIN (account);
|
||||
|
||||
if (self->use_direct_connection)
|
||||
return;
|
||||
|
||||
if (!self->nua) {
|
||||
g_warning ("Cannot go online: nua handle not initialized");
|
||||
g_object_notify_by_pspec (G_OBJECT (self), props[PROP_ACC_STATE]);
|
||||
|
@ -1038,11 +1041,11 @@ init_sip_account (CallsSipOrigin *self,
|
|||
self->state = CALLS_ACCOUNT_ONLINE;
|
||||
else {
|
||||
self->state = CALLS_ACCOUNT_OFFLINE;
|
||||
|
||||
if (self->auto_connect)
|
||||
go_online (CALLS_ACCOUNT (self), TRUE);
|
||||
}
|
||||
|
||||
if (self->auto_connect)
|
||||
go_online (CALLS_ACCOUNT (self), TRUE);
|
||||
|
||||
g_object_notify_by_pspec (G_OBJECT (self), props[PROP_ACC_STATE]);
|
||||
return TRUE;
|
||||
|
||||
|
|
Loading…
Reference in a new issue