summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
Diffstat (limited to 'res')
-rw-r--r--res/res_fax.c7
-rw-r--r--res/res_pjproject.c7
-rw-r--r--res/res_pjsip/location.c2
-rw-r--r--res/res_rtp_asterisk.c10
4 files changed, 12 insertions, 14 deletions
diff --git a/res/res_fax.c b/res/res_fax.c
index 6282b13d7..ad6e2386c 100644
--- a/res/res_fax.c
+++ b/res/res_fax.c
@@ -2846,11 +2846,8 @@ static struct ast_fax_session *fax_v21_session_new (struct ast_channel *chan) {
}
v21_details->caps = AST_FAX_TECH_V21_DETECT;
- if (!(v21_session = fax_session_new(v21_details, chan, NULL, NULL))) {
- ao2_ref(v21_details, -1);
- return NULL;
- }
-
+ v21_session = fax_session_new(v21_details, chan, NULL, NULL);
+ ao2_ref(v21_details, -1);
return v21_session;
}
diff --git a/res/res_pjproject.c b/res/res_pjproject.c
index f54c3713e..08699f3ee 100644
--- a/res/res_pjproject.c
+++ b/res/res_pjproject.c
@@ -177,7 +177,6 @@ static void log_forwarder(int level, const char *data, int len)
const char * log_source = "pjproject";
int log_line = 0;
const char *log_func = "<?>";
- int mod_level;
if (pjproject_log_intercept.fd != -1
&& pjproject_log_intercept.thread == pthread_self()) {
@@ -196,10 +195,8 @@ static void log_forwarder(int level, const char *data, int len)
}
if (ast_level == __LOG_DEBUG) {
- /* For levels 3 and up, obey the debug level for res_pjproject */
- mod_level = ast_opt_dbg_module ?
- ast_debug_get_by_module("res_pjproject") : 0;
- if (option_debug < level && mod_level < level) {
+ /* Obey the debug level for res_pjproject */
+ if (!DEBUG_ATLEAST(level)) {
return;
}
}
diff --git a/res/res_pjsip/location.c b/res/res_pjsip/location.c
index bf08d8e86..f02a72c77 100644
--- a/res/res_pjsip/location.c
+++ b/res/res_pjsip/location.c
@@ -1138,7 +1138,7 @@ int ast_sip_initialize_sorcery_location(void)
ast_sorcery_object_field_register(sorcery, "contact", "qualify_frequency", 0, OPT_UINT_T,
PARSE_IN_RANGE, FLDSET(struct ast_sip_contact, qualify_frequency), 0, 86400);
ast_sorcery_object_field_register(sorcery, "contact", "qualify_timeout", "3.0", OPT_DOUBLE_T, 0, FLDSET(struct ast_sip_contact, qualify_timeout));
- ast_sorcery_object_field_register(sorcery, "contact", "authenticate_qualify", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_contact, authenticate_qualify));
+ ast_sorcery_object_field_register(sorcery, "contact", "authenticate_qualify", "no", OPT_YESNO_T, 1, FLDSET(struct ast_sip_contact, authenticate_qualify));
ast_sorcery_object_field_register(sorcery, "contact", "outbound_proxy", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_contact, outbound_proxy));
ast_sorcery_object_field_register(sorcery, "contact", "user_agent", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_contact, user_agent));
ast_sorcery_object_field_register(sorcery, "contact", "reg_server", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_contact, reg_server));
diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index 7665b5cc0..feab1ca80 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -540,8 +540,8 @@ static int ice_candidate_cmp(void *obj, void *arg, int flags)
if (strcmp(candidate1->foundation, candidate2->foundation) ||
candidate1->id != candidate2->id ||
- ast_sockaddr_cmp(&candidate1->address, &candidate2->address) ||
- candidate1->type != candidate1->type) {
+ candidate1->type != candidate2->type ||
+ ast_sockaddr_cmp(&candidate1->address, &candidate2->address)) {
return 0;
}
@@ -1398,7 +1398,7 @@ static int ast_rtp_dtls_set_configuration(struct ast_rtp_instance *instance, con
if (!ast_strlen_zero(dtls_cfg->certfile)) {
char *private = ast_strlen_zero(dtls_cfg->pvtfile) ? dtls_cfg->certfile : dtls_cfg->pvtfile;
BIO *certbio;
- X509 *cert;
+ X509 *cert = NULL;
const EVP_MD *type;
unsigned int size, i;
unsigned char fingerprint[EVP_MAX_MD_SIZE];
@@ -1440,6 +1440,9 @@ static int ast_rtp_dtls_set_configuration(struct ast_rtp_instance *instance, con
ast_log(LOG_ERROR, "Could not produce fingerprint from certificate '%s' for RTP instance '%p'\n",
dtls_cfg->certfile, instance);
BIO_free_all(certbio);
+ if (cert) {
+ X509_free(cert);
+ }
return -1;
}
@@ -1451,6 +1454,7 @@ static int ast_rtp_dtls_set_configuration(struct ast_rtp_instance *instance, con
*(local_fingerprint-1) = 0;
BIO_free_all(certbio);
+ X509_free(cert);
}
if (!ast_strlen_zero(dtls_cfg->cipher)) {