Merge "sig_pri: Address gcc9 issues"

This commit is contained in:
George Joseph
2019-06-25 09:55:17 -05:00
committed by Gerrit Code Review

View File

@@ -6037,11 +6037,14 @@ static void sig_pri_handle_setup(struct sig_pri_span *pri, pri_event *e)
/* Setup the user tag for party id's from this device for this call. */ /* Setup the user tag for party id's from this device for this call. */
if (pri->append_msn_to_user_tag) { if (pri->append_msn_to_user_tag) {
snprintf(pri->pvts[chanpos]->user_tag, int len = snprintf(pri->pvts[chanpos]->user_tag,
sizeof(pri->pvts[chanpos]->user_tag), "%s_%s", sizeof(pri->pvts[chanpos]->user_tag), "%s_%s",
pri->initial_user_tag, pri->initial_user_tag,
pri->nodetype == PRI_NETWORK pri->nodetype == PRI_NETWORK
? plancallingnum : e->ring.callednum); ? plancallingnum : e->ring.callednum);
if (len >= sizeof(pri->pvts[chanpos]->user_tag)) {
ast_log(LOG_WARNING, "user_tag '%s' truncated\n", pri->pvts[chanpos]->user_tag);
}
} else { } else {
ast_copy_string(pri->pvts[chanpos]->user_tag, ast_copy_string(pri->pvts[chanpos]->user_tag,
pri->initial_user_tag, sizeof(pri->pvts[chanpos]->user_tag)); pri->initial_user_tag, sizeof(pri->pvts[chanpos]->user_tag));
@@ -6435,7 +6438,7 @@ static void *pri_dchannel(void *vpri)
if (e) { if (e) {
int chanpos = -1; int chanpos = -1;
char cause_str[35]; char cause_str[36];
if (pri->debug) { if (pri->debug) {
ast_verbose("Span %d: Processing event %s(%d)\n", ast_verbose("Span %d: Processing event %s(%d)\n",