rem: cp = eat_space_end(ptype.s, ptype.s + ptype.len);
add: cp = eat_token_end(ptype.s, ptype.s + ptype.len);
context: extract_mediaport(str *body, str *mediaport){	char *cp, *cp1;	int len, i;	str ptype;	cp1 = NULL;	for (cp = body->s; (len = body->s + body->len - cp) > 0;) {		cp1 = ser_memmem(cp, "m=", len, 2);		if (cp1 == NULL || cp1[-1] == '\n' || cp1[-1] == '\r')			break;		cp = cp1 + 2;	}	if (cp1 == NULL) {		LOG(L_ERR, "ERROR: extract_mediaport: no `m=' in SDP\n");		return -1;	}	mediaport->s = cp1 + 2; /* skip `m=' */	mediaport->len = eat_line(mediaport->s, body->s + body->len -	  mediaport->s) - mediaport->s;	trim_len(mediaport->len, mediaport->s, *mediaport);	/* Skip media supertype and spaces after it */	cp = eat_token_end(mediaport->s, mediaport->s + mediaport->len);	mediaport->len -= cp - mediaport->s;	if (mediaport->len <= 0 || cp == mediaport->s) {		LOG(L_ERR, "ERROR: extract_mediaport: no port in `m='\n");		return -1;	}	mediaport->s = cp;	cp = eat_space_end(mediaport->s, mediaport->s + mediaport->len);	mediaport->len -= cp - mediaport->s;	if (mediaport->len <= 0 || cp == mediaport->s) {		LOG(L_ERR, "ERROR: extract_mediaport: no port in `m='\n");		return -1;	}	/* Extract port */	mediaport->s = cp;	cp = eat_token_end(mediaport->s, mediaport->s + mediaport->len);	ptype.len = mediaport->len - (cp - mediaport->s);	if (ptype.len <= 0 || cp == mediaport->s) {		LOG(L_ERR, "ERROR: extract_mediaport: no port in `m='\n");		return -1;	}	ptype.s = cp;	mediaport->len = cp - mediaport->s;	/* Skip spaces after port */	cp = eat_space_end(ptype.s, ptype.s + ptype.len);	ptype.len -= cp - ptype.s;	if (ptype.len <= 0 || cp == ptype.s) {		LOG(L_ERR, "ERROR: extract_mediaport: no protocol type in `m='\n");		return -1;	}	/* Extract protocol type */	ptype.s = cp;	cp = eat_space_end(ptype.s, ptype.s + ptype.len);	if (cp == ptype.s) {		LOG(L_ERR, "ERROR: extract_mediaport: no protocol type in `m='\n");		return -1;	}	ptype.len = cp - ptype.s;	for (i = 0; sup_ptypes[i].s != NULL; i++)		if (ptype.len == sup_ptypes[i].len &&		    strncasecmp(ptype.s, sup_ptypes[i].s, ptype.len) == 0)			return 0;	/* Unproxyable protocol type. Generally it isn't error. */	return -1;}