diff --git a/libs/libdingaling/src/libdingaling.c b/libs/libdingaling/src/libdingaling.c index 0b7c037866..8efe5c4af5 100644 --- a/libs/libdingaling/src/libdingaling.c +++ b/libs/libdingaling/src/libdingaling.c @@ -3028,7 +3028,7 @@ ldl_status ldl_session_get_candidates(ldl_session_t *session, ldl_transport_type { assert(tport < LDL_TPORT_MAX); - if (session->candidate_len) { + if (session->candidate_len[tport]) { *candidates = session->candidates[tport]; *len = session->candidate_len[tport]; return LDL_STATUS_SUCCESS; diff --git a/src/mod/endpoints/mod_skypopen/mod_skypopen.c b/src/mod/endpoints/mod_skypopen/mod_skypopen.c index d50f372776..bb5343aa28 100644 --- a/src/mod/endpoints/mod_skypopen/mod_skypopen.c +++ b/src/mod/endpoints/mod_skypopen/mod_skypopen.c @@ -2785,7 +2785,7 @@ int skypopen_partner_handle_ring(private_t *tech_pvt) } else { ERRORA("no session\n", SKYPOPEN_P_LOG); } - } else if (!tech_pvt || !tech_pvt->skype_call_id) { + } else if (!tech_pvt || !tech_pvt->skype_call_id[0]) { ERRORA("No Call ID?\n", SKYPOPEN_P_LOG); } else { DEBUGA_SKYPE("We're in a call now (%s), let's refuse this one (%s)\n", SKYPOPEN_P_LOG, tech_pvt->skype_call_id, id); @@ -2884,7 +2884,7 @@ int skypopen_answer(private_t *tech_pvt) DEBUGA_SKYPE ("NEW! name: %s, state: %d, value=%s, tech_pvt->callid_number=%s, tech_pvt->skype_user=%s\n", SKYPOPEN_P_LOG, tech_pvt->name, tech_pvt->interface_state, value, tech_pvt->callid_number, tech_pvt->skype_user); - } else if (!tech_pvt || !tech_pvt->skype_call_id) { + } else if (!tech_pvt || !tech_pvt->skype_call_id[0]) { ERRORA("No Call ID?\n", SKYPOPEN_P_LOG); } else { DEBUGA_SKYPE("We're in a call now (%s), let's refuse this one (%s)\n", SKYPOPEN_P_LOG, tech_pvt->skype_call_id, id); @@ -2956,9 +2956,9 @@ int skypopen_transfer(private_t *tech_pvt) } DEBUGA_SKYPE("NOT FOUND\n", SKYPOPEN_P_LOG); - if (!tech_pvt || !tech_pvt->skype_call_id || !strlen(tech_pvt->skype_call_id)) { + if (!tech_pvt || !tech_pvt->skype_call_id[0]) { /* we are not inside an active call */ - DEBUGA_SKYPE("We're NO MORE in a call now %s\n", SKYPOPEN_P_LOG, (tech_pvt && tech_pvt->skype_call_id) ? tech_pvt->skype_call_id : ""); + DEBUGA_SKYPE("We're NO MORE in a call now %s\n", SKYPOPEN_P_LOG, tech_pvt ? tech_pvt->skype_call_id : ""); switch_mutex_unlock(globals.mutex); } else { diff --git a/src/mod/event_handlers/mod_cdr_mongodb/driver/src/mongo.c b/src/mod/event_handlers/mod_cdr_mongodb/driver/src/mongo.c index daf92b4c7b..618ffbdfdf 100644 --- a/src/mod/event_handlers/mod_cdr_mongodb/driver/src/mongo.c +++ b/src/mod/event_handlers/mod_cdr_mongodb/driver/src/mongo.c @@ -57,7 +57,7 @@ const char* _get_host_port(mongo_host_port* hp) { MONGO_EXPORT const char* mongo_get_primary(mongo* conn) { mongo* conn_ = (mongo*)conn; - if( !(conn_->connected) || (conn_->primary->host == '\0') ) + if( !(conn_->connected) || (*conn_->primary->host == '\0') ) return NULL; return _get_host_port(conn_->primary); }