Module: kamailio
Branch: master
Commit: 30f620ae2254888c0d8d7edc375cb312e33de124
URL:
https://github.com/kamailio/kamailio/commit/30f620ae2254888c0d8d7edc375cb31…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-04-05T08:23:29+02:00
sdpops: use find_sdp_line_start() to find start of attribute line
---
Modified: src/modules/sdpops/sdpops_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/30f620ae2254888c0d8d7edc375cb31…
Patch:
https://github.com/kamailio/kamailio/commit/30f620ae2254888c0d8d7edc375cb31…
---
diff --git a/src/modules/sdpops/sdpops_mod.c b/src/modules/sdpops/sdpops_mod.c
index 30de5dfc543..f40062420a7 100644
--- a/src/modules/sdpops/sdpops_mod.c
+++ b/src/modules/sdpops/sdpops_mod.c
@@ -2059,6 +2059,9 @@ int bind_sdpops(struct sdpops_binds *sob)
return 0;
}
+/**
+ *
+ */
int sdpops_attr_val(str *payload, str *attr, str *val)
{
char *sline;
@@ -2066,16 +2069,9 @@ int sdpops_attr_val(str *payload, str *attr, str *val)
val->s = NULL;
val->len = 0;
- sline = find_sdp_line(payload->s, payload->s + payload->len, attr->s[0]);
+ sline = find_sdp_line_start(
+ payload->s, payload->s + payload->len, attr->s[0], 0);
while(sline != NULL) {
- /* check start of line */
- if(sline > payload->s) {
- if(eline[-1] != '\n' && eline[-1] != '\r') {
- sline = find_next_sdp_line(
- sline, payload->s + payload->len, attr->s[0], NULL);
- continue;
- }
- }
/* find EoL or EoData */
eline = sline;
while(eline < payload->s + payload->len) {