summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2021-03-28 13:09:41 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2021-03-28 13:15:12 +0200
commit8300dce9fbf0bedd89acc0186e1b6e26c2a74d3d (patch)
tree9a4c2f1333fb06bd2cda767a6029f066458affcd
parenteb9b40c2606508f7a25f095eef5a0f3df970e08f (diff)
Updated libs
-rw-r--r--src/libosmocc/screen.c2
-rw-r--r--src/libosmocc/sdp.c11
2 files changed, 9 insertions, 4 deletions
diff --git a/src/libosmocc/screen.c b/src/libosmocc/screen.c
index c8e17dc..5040ce6 100644
--- a/src/libosmocc/screen.c
+++ b/src/libosmocc/screen.c
@@ -578,7 +578,7 @@ osmo_cc_msg_t *osmo_cc_screen_msg(osmo_cc_endpoint_t *ep, osmo_cc_msg_t *old_msg
}
rc = osmo_cc_get_ie_redir(old_msg, 0, &redir_type, &redir_plan, &redir_present, &redir_screen, &redir_reason, id, sizeof(id));
if (rc >= 0) {
- rc = osmo_cc_screen("incoming redirecting number", ep->screen_calling_in, &redir_type, &redir_present, redir, sizeof(redir), id, routing_p);
+ rc = osmo_cc_screen("incoming redirecting number", ep->screen_calling_in, &redir_type, &redir_present, redir, sizeof(redir), id, NULL);
if (rc >= 0)
redir_status = 1;
}
diff --git a/src/libosmocc/sdp.c b/src/libosmocc/sdp.c
index 5afd3d6..0f8bca9 100644
--- a/src/libosmocc/sdp.c
+++ b/src/libosmocc/sdp.c
@@ -486,14 +486,14 @@ struct osmo_cc_session *osmo_cc_session_parsesdp(void *priv, const char *_sdp)
}
PDEBUG(DCC, DEBUG_DEBUG, " -> (rtpmap) payload type = %d\n", codec->payload_type_remote);
if (!(word = wordsep(&next_word)))
- break;
+ goto rtpmap_done;
if ((p = strchr(word, '/')))
*p++ = '\0';
free((char *)codec->payload_name); // in case it is already set above
codec->payload_name = strdup(word);
PDEBUG(DCC, DEBUG_DEBUG, " -> (rtpmap) payload name = %s\n", codec->payload_name);
if (!(word = p))
- break;
+ goto rtpmap_done;
if ((p = strchr(word, '/')))
*p++ = '\0';
codec->payload_rate = atoi(word);
@@ -502,10 +502,15 @@ struct osmo_cc_session *osmo_cc_session_parsesdp(void *priv, const char *_sdp)
/* if no channel is given and no default was specified, we must set 1 channel */
if (!codec->payload_channels)
codec->payload_channels = 1;
- break;
+ goto rtpmap_done;
}
codec->payload_channels = atoi(word);
PDEBUG(DCC, DEBUG_DEBUG, " -> (rtpmap) payload channels = %d\n", codec->payload_channels);
+ rtpmap_done:
+ if (!codec->payload_name || !codec->payload_rate || !codec->payload_channels) {
+ PDEBUG(DCC, DEBUG_NOTICE, "Broken 'rtpmap' definition in SDP line %d = '%s' Skipping codec!\n", line_no, line);
+ osmo_cc_free_codec(codec);
+ }
}
break;
}