Skip to content

Commit

Permalink
Improved error logging on parsing KV flags for save()
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdan-iancu committed May 23, 2023
1 parent 1668bc3 commit f9cade9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/reg/save_flags.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,21 +74,24 @@ int reg_fixup_save_flags(void** param, struct save_flags *default_flags)
/* max-contacts */
if (flag_vals[0].s) {
if (str2int(&flag_vals[0], &save_flags->max_contacts) < 0) {
LM_ERR("value is not an integer\n");
LM_ERR("max-contacts [%.*s] value is not an integer\n",
flag_vals[0].len, flag_vals[0].s);
return -1;
}
}
/* min-expires */
if (flag_vals[1].s) {
if (str2int(&flag_vals[1], &save_flags->min_expires) < 0) {
LM_ERR("value is not an integer\n");
LM_ERR("min-expires [%.*s] value is not an integer\n",
flag_vals[1].len, flag_vals[1].s);
return -1;
}
}
/* max-expires */
if (flag_vals[2].s) {
if (str2int(&flag_vals[2], &save_flags->max_expires) < 0) {
LM_ERR("value is not an integer\n");
LM_ERR("min-expires [%.*s] value is not an integer\n",
flag_vals[2].len, flag_vals[2].s);
return -1;
}
}
Expand Down

0 comments on commit f9cade9

Please sign in to comment.