mirror of
https://github.com/moparisthebest/curl
synced 2025-01-11 05:58:01 -05:00
parent
76140ecfde
commit
adb0fcfab2
13
lib/rtsp.c
13
lib/rtsp.c
@ -786,9 +786,18 @@ CURLcode Curl_rtsp_parseheader(struct connectdata *conn,
|
|||||||
failf(data, "Got a blank Session ID");
|
failf(data, "Got a blank Session ID");
|
||||||
}
|
}
|
||||||
else if(data->set.str[STRING_RTSP_SESSION_ID]) {
|
else if(data->set.str[STRING_RTSP_SESSION_ID]) {
|
||||||
|
char *end;
|
||||||
|
size_t idlen;
|
||||||
|
|
||||||
|
/* Find the end of Session ID */
|
||||||
|
end = start + 1;
|
||||||
|
while(*end && !ISSPACE(*end))
|
||||||
|
end++;
|
||||||
|
idlen = end - start;
|
||||||
|
|
||||||
/* If the Session ID is set, then compare */
|
/* If the Session ID is set, then compare */
|
||||||
if(strncmp(start, data->set.str[STRING_RTSP_SESSION_ID],
|
if(strlen(data->set.str[STRING_RTSP_SESSION_ID]) != idlen ||
|
||||||
strlen(data->set.str[STRING_RTSP_SESSION_ID])) != 0) {
|
strncmp(start, data->set.str[STRING_RTSP_SESSION_ID], idlen) != 0) {
|
||||||
failf(data, "Got RTSP Session ID Line [%s], but wanted ID [%s]",
|
failf(data, "Got RTSP Session ID Line [%s], but wanted ID [%s]",
|
||||||
start, data->set.str[STRING_RTSP_SESSION_ID]);
|
start, data->set.str[STRING_RTSP_SESSION_ID]);
|
||||||
return CURLE_RTSP_SESSION_ERROR;
|
return CURLE_RTSP_SESSION_ERROR;
|
||||||
|
Loading…
Reference in New Issue
Block a user