Skip to content

Commit

Permalink
ua: ua_hangupf - remove duplicated code
Browse files Browse the repository at this point in the history
  • Loading branch information
cspiel1 committed Nov 29, 2024
1 parent a82106e commit 75594da
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions src/ua.c
Original file line number Diff line number Diff line change
Expand Up @@ -1428,21 +1428,7 @@ int ua_connect(struct ua *ua, struct call **callp,
void ua_hangup(struct ua *ua, struct call *call,
uint16_t scode, const char *reason)
{
if (!ua)
return;

if (!call) {
call = ua_call(ua);
if (!call)
return;
}

call_hangup(call, scode, reason);

bevent_call_emit(UA_EVENT_CALL_CLOSED, call,
reason ? reason : "Connection reset by user");

mem_deref(call);
ua_hangupf(ua, call, scode, reason, NULL);
}


Expand Down

0 comments on commit 75594da

Please sign in to comment.