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:
@@ -282,6 +282,12 @@ dial (CallsOrigin *origin,
|
|||||||
return;
|
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);
|
self = CALLS_SIP_ORIGIN (origin);
|
||||||
|
|
||||||
nh = nua_handle (self->nua, self->oper,
|
nh = nua_handle (self->nua, self->oper,
|
||||||
|
|||||||
Reference in New Issue
Block a user