summaryrefslogtreecommitdiff
path: root/main/rtp_engine.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/rtp_engine.c')
-rw-r--r--main/rtp_engine.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/main/rtp_engine.c b/main/rtp_engine.c
index 82fb3b2be..4e686fa1b 100644
--- a/main/rtp_engine.c
+++ b/main/rtp_engine.c
@@ -1357,11 +1357,15 @@ int ast_rtp_instance_make_compatible(struct ast_channel *chan, struct ast_rtp_in
}
glue->get_rtp_info(peer, &peer_instance);
-
- if (!peer_instance || peer_instance->engine != instance->engine) {
+ if (!peer_instance) {
+ ast_log(LOG_ERROR, "Unable to get_rtp_info for peer type %s\n", glue->type);
+ ast_channel_unlock(peer);
+ return -1;
+ }
+ if (peer_instance->engine != instance->engine) {
+ ast_log(LOG_ERROR, "Peer engine mismatch for type %s\n", glue->type);
ast_channel_unlock(peer);
ao2_ref(peer_instance, -1);
- peer_instance = NULL;
return -1;
}