char *psz_destination = p_sys->psz_destination;
const char *psz_session = NULL;
const char *psz_cseq = NULL;
- int i_cseq = 0;
if( answer == NULL || query == NULL )
{
answer->i_proto = HTTPD_PROTO_RTSP;
answer->i_version= query->i_version;
answer->i_type = HTTPD_MSG_ANSWER;
+ answer->i_body = 0;
+ answer->p_body = NULL;
switch( query->i_type )
{
rtsp_client_t *rtsp;
/* for now only multicast so easy */
answer->i_status = 200;
- answer->i_body = 0;
- answer->p_body = NULL;
psz_session = httpd_MsgGet( query, "Session" );
rtsp = RtspClientGet( p_stream, psz_session );
/* for now only multicast so easy again */
answer->i_status = 200;
- answer->i_body = 0;
- answer->p_body = NULL;
psz_session = httpd_MsgGet( query, "Session" );
rtsp = RtspClientGet( p_stream, psz_session );
default:
return VLC_EGENERIC;
}
+
httpd_MsgAdd( answer, "Server", PACKAGE_STRING );
httpd_MsgAdd( answer, "Content-Length", "%d", answer->i_body );
psz_cseq = httpd_MsgGet( query, "Cseq" );
- if( psz_cseq )
- i_cseq = atoi( psz_cseq );
- else
- i_cseq = 0;
- httpd_MsgAdd( answer, "Cseq", "%d", i_cseq );
+ httpd_MsgAdd( answer, "Cseq", "%u", psz_cseq ? psz_cseq : "0" );
httpd_MsgAdd( answer, "Cache-Control", "%s", "no-cache" );
if( psz_session )
char psz_session_init[100];
const char *psz_session = NULL;
const char *psz_cseq = NULL;
- int i_cseq = 0;
if( answer == NULL || query == NULL )
answer->i_proto = HTTPD_PROTO_RTSP;
answer->i_version= query->i_version;
answer->i_type = HTTPD_MSG_ANSWER;
+ answer->i_body = 0;
+ answer->p_body = NULL;
switch( query->i_type )
{
if( psz_transport == NULL )
{
answer->i_status = 461;
- answer->i_body = 0;
- answer->p_body = NULL;
break;
}
{
//fprintf( stderr, "HTTPD_MSG_SETUP: multicast\n" );
answer->i_status = 200;
- answer->i_body = 0;
- answer->p_body = NULL;
psz_session = httpd_MsgGet( query, "Session" );
if( !psz_session )
if( httpd_ClientIP( cl, ip ) == NULL )
{
answer->i_status = 500;
- answer->i_body = 0;
- answer->p_body = NULL;
break;
}
if( rtsp == NULL )
{
answer->i_status = 454;
- answer->i_body = 0;
- answer->p_body = NULL;
break;
}
}
msg_Err( p_stream, "cannot create the access out for %s://%s",
psz_access, psz_url );
answer->i_status = 500;
- answer->i_body = 0;
- answer->p_body = NULL;
break;
}
TAB_APPEND( rtsp->i_access, rtsp->access, p_access );
answer->i_status = 200;
- answer->i_body = 0;
- answer->p_body = NULL;
httpd_MsgAdd( answer, "Transport",
"RTP/AVP/UDP;client_port=%d-%d", i_port, i_port + 1 );
else /* TODO strstr( psz_transport, "interleaved" ) ) */
{
answer->i_status = 461;
- answer->i_body = 0;
- answer->p_body = NULL;
}
break;
}
default:
return VLC_EGENERIC;
}
+
httpd_MsgAdd( answer, "Server", "VLC Server" );
httpd_MsgAdd( answer, "Content-Length", "%d", answer->i_body );
psz_cseq = httpd_MsgGet( query, "Cseq" );
- if( psz_cseq )
- i_cseq = atoi( psz_cseq );
- else
- i_cseq = 0;
- httpd_MsgAdd( answer, "Cseq", "%d", i_cseq );
+ httpd_MsgAdd( answer, "Cseq", "%s", psz_cseq ? psz_cseq : "0");
httpd_MsgAdd( answer, "Cache-Control", "%s", "no-cache" );
if( psz_session )