mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-19 16:20:37 +00:00
Coverity Report: Fix issues for error type CHECKED_RETURN for core
(issue ASTERISK-19658) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/1905/ ........ Merged revisions 366094 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 366106 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -16384,7 +16384,9 @@ static void check_via(struct sip_pvt *p, struct sip_request *req)
|
||||
p->sa = p->recv;
|
||||
}
|
||||
|
||||
ast_sockaddr_resolve_first(&tmp, c, 0);
|
||||
if (ast_sockaddr_resolve_first(&tmp, c, 0)) {
|
||||
ast_log(LOG_WARNING, "Could not resolve socket address for '%s'\n", c);
|
||||
}
|
||||
port = ast_sockaddr_port(&tmp);
|
||||
ast_sockaddr_set_port(&p->sa,
|
||||
port != 0 ? port : STANDARD_SIP_PORT);
|
||||
@@ -16733,6 +16735,7 @@ static enum check_auth_result check_user_full(struct sip_pvt *p, struct sip_requ
|
||||
|
||||
/* Finally, apply the guest policy */
|
||||
if (sip_cfg.allowguest) {
|
||||
/* Ignore check_return warning from Coverity for get_rpid below. */
|
||||
get_rpid(p, req);
|
||||
p->rtptimeout = global_rtptimeout;
|
||||
p->rtpholdtimeout = global_rtpholdtimeout;
|
||||
@@ -18682,7 +18685,10 @@ static int show_chanstats_cb(void *__cur, void *__arg, int flags)
|
||||
return 0; /* don't care, we scan all channels */
|
||||
}
|
||||
|
||||
ast_rtp_instance_get_stats(cur->rtp, &stats, AST_RTP_INSTANCE_STAT_ALL);
|
||||
if (ast_rtp_instance_get_stats(cur->rtp, &stats, AST_RTP_INSTANCE_STAT_ALL)) {
|
||||
ast_log(LOG_WARNING, "Could not get RTP stats.\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (c && ast_channel_cdr(c) && !ast_tvzero(ast_channel_cdr(c)->start)) {
|
||||
duration = (int)(ast_tvdiff_ms(ast_tvnow(), ast_channel_cdr(c)->start) / 1000);
|
||||
|
||||
Reference in New Issue
Block a user