mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-06 03:25:31 +00:00
sip: origin: Prevent dialing when not online
Setting up the nua context could have failed (see #379) and in that case our nua_*() calls might derefence a NULL pointer.
This commit is contained in:
parent
ad05b0a28d
commit
73cf5081d0
1 changed files with 6 additions and 0 deletions
|
@ -282,6 +282,12 @@ dial (CallsOrigin *origin,
|
|||
return;
|
||||
}
|
||||
|
||||
if (calls_account_get_state (CALLS_ACCOUNT (origin)) != CALLS_ACCOUNT_ONLINE) {
|
||||
g_warning ("Tried dialing on origin '%s', but it's not online",
|
||||
name);
|
||||
return;
|
||||
}
|
||||
|
||||
self = CALLS_SIP_ORIGIN (origin);
|
||||
|
||||
nh = nua_handle (self->nua, self->oper,
|
||||
|
|
Loading…
Reference in a new issue