Hi All,
Just curious as to why the parsing of IP type was removed from extract_mediaip in parser/sdp/sdp_helper_funcs.c. The latest code looks like below (could I suggest adding the highlighted part?):
p.s. If there are no objections/responses I will commit to master branch.
Cheers
Jason
int extract_mediaip(str *body, str *mediaip, int *pf, char *line)
{
char *cp, *cp1;
int len;
cp1 = NULL;
for (cp = body->s; (len = body->s + body->len - cp) > 0;) {
cp1 = (char*)ser_memmem(cp, line, len, 2);
if (cp1 == NULL || cp1[-1] == '\n' || cp1[-1] == '\r')
break;
cp = cp1 + 2;
}
if (cp1 == NULL)
return -1;
mediaip->s = cp1 + 2;
mediaip->len = eat_line(mediaip->s, body->s + body->len - mediaip->s) - mediaip->s;
trim_len(mediaip->len, mediaip->s, *mediaip);
if (mediaip->len == 0) {
LM_ERR("no [%s] line in SDP\n",line);
return -1;
}
/* search reverse for IP[4|6] in c=/o= line */
cp = (char*)ser_memrmem(mediaip->s, " IP", mediaip->len, 3);
if (cp == NULL) {
LM_ERR("no `IP[4|6]' in `%s' field\n",line);
return -1;
}