Skip to content

Commit

Permalink
usrloc: Silence ERR logs on failed contact DEL packets
Browse files Browse the repository at this point in the history
  • Loading branch information
liviuchircu committed Feb 12, 2025
1 parent 360a165 commit cfbfd3f
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions modules/usrloc/ul_cluster.c
Original file line number Diff line number Diff line change
Expand Up @@ -870,18 +870,27 @@ static int receive_ucontact_delete(bin_packet_t *packet)
if (get_urecord(domain, &aor, &record) != 0) {
LM_INFO("failed to fetch local urecord - ignoring request "
"(ci: '%.*s')\n", callid.len, callid.s);
unlock_udomain(domain, &aor);
goto out;
}

/* simply specify a higher cseq and completely avoid any complications */
rc = get_ucontact(record, &contact_str, &callid, cseq + 1, &cmatch,
&contact);
if (rc != 0 && rc != 2) {
LM_ERR("contact '%.*s' not found: (ci: '%.*s')\n", contact_str.len,
switch (rc) {
case -2:
case -1:
/* the DEL packet is too old (same or lower CSeq) */
LM_ERR("contact '%.*s' found, but DEL too old: (rc: %d, ci: '%.*s')\n",
contact_str.len, contact_str.s, rc, callid.len, callid.s);
goto out;
break;

case 1:
LM_DBG("contact '%.*s' already deleted: (ci: '%.*s')\n", contact_str.len,
contact_str.s, callid.len, callid.s);
unlock_udomain(domain, &aor);
goto error;
goto out;
break;
default:;
}

if (skip_replicated_db_ops)
Expand All @@ -894,9 +903,8 @@ static int receive_ucontact_delete(bin_packet_t *packet)
goto error;
}

unlock_udomain(domain, &aor);

out:
unlock_udomain(domain, &aor);
free_pkg_str_list(cmatch.match_params);
return 0;

Expand Down

0 comments on commit cfbfd3f

Please sign in to comment.