diff --git a/src/call.c b/src/call.c index 194a7db87..7ae8a9234 100644 --- a/src/call.c +++ b/src/call.c @@ -2296,6 +2296,9 @@ int call_accept(struct call *call, struct sipsess_sock *sess_sock, bool call_sess_cmp(const struct call *call, const struct sip_msg *msg) { + if (!call || !msg) + return false; + return sipsess_msg_equal(call->sess, msg); } diff --git a/src/ua.c b/src/ua.c index 216457bf4..acc4aec0e 100644 --- a/src/ua.c +++ b/src/ua.c @@ -803,7 +803,7 @@ int ua_accept(struct ua *ua, const struct sip_msg *msg) return EINVAL; if (ua_find_call_msg(ua, msg)) { - warning("ua: call was already accepted\n"); + warning("ua: call was already created\n"); return EINVAL; }