else if( strstr( psz_transport, "unicast" ) && strstr( psz_transport, "client_port=" ) )
{
int i_port = atoi( strstr( psz_transport, "client_port=" ) + strlen("client_port=") );
- char *ip = httpd_ClientIP( cl );
+ char ip[NI_MAXNUMERICHOST];
char psz_access[100];
char psz_url[100];
rtsp_client_t *rtsp = NULL;
- if( ip == NULL )
+ if( httpd_ClientIP( cl, ip ) == NULL )
{
answer->i_status = 500;
answer->psz_status = strdup( "Internal server error" );
answer->psz_status = strdup( "Unknown session id" );
answer->i_body = 0;
answer->p_body = NULL;
- free( ip );
break;
}
}
else
sprintf( psz_access, "udp{raw}" );
sprintf( psz_url, "%s:%d", ip, i_port );
- free( ip );
-
+
if( ( p_access = sout_AccessOutNew( p_stream->p_sout, psz_access, psz_url ) ) == NULL )
{
msg_Err( p_stream, "cannot create the access out for %s://%s",