Skip to content

Commit

Permalink
status_report: Avoid return 0 in sr_set_status()
Browse files Browse the repository at this point in the history
  • Loading branch information
liviuchircu committed May 10, 2024
1 parent 7f12c44 commit 64c0042
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions modules/status_report/status_report.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,16 @@ static int w_add_report(struct sip_msg *msg, void *srg,
static int w_set_status(struct sip_msg *msg, void *srg,
int *status, str *txt)
{
int rc;

if (txt)
return sr_set_status( srg, CHAR_INT_NULL,
rc = sr_set_status( srg, CHAR_INT_NULL,
*status, txt->s, txt->len, 1/*public access*/);
else
return sr_set_status( srg, CHAR_INT_NULL,
rc = sr_set_status( srg, CHAR_INT_NULL,
*status, CHAR_INT_NULL, 1/*public access*/);

return !rc ? 1 : rc;
}


0 comments on commit 64c0042

Please sign in to comment.