]> git.sesse.net Git - vlc/commitdiff
* src/*: portability fixes.
authorGildas Bazin <gbazin@videolan.org>
Fri, 23 Apr 2004 12:38:04 +0000 (12:38 +0000)
committerGildas Bazin <gbazin@videolan.org>
Fri, 23 Apr 2004 12:38:04 +0000 (12:38 +0000)
* msvc/vlc.dsw: httpd is not a plugin anymore.

msvc/vlc.dsw
src/libvlc.h
src/misc/httpd.c
src/stream_output/announce.c

index 7fd33cbfb77888626f7efc8999a1c85528c58e79..d972ce935cd914c9311de1b33c863460ac181dba 100644 (file)
@@ -102,18 +102,6 @@ Package=<4>
 \r
 ###############################################################################\r
 \r
-Project: "plugin_httpd"=.\plugin_httpd.dsp - Package Owner=<4>\r
-\r
-Package=<5>\r
-{{{\r
-}}}\r
-\r
-Package=<4>\r
-{{{\r
-}}}\r
-\r
-###############################################################################\r
-\r
 Project: "plugin_access_output_udp"=.\plugin_access_output_udp.dsp - Package Owner=<4>\r
 \r
 Package=<5>\r
index 78bc4aa75f9efea71397cb6e7739589447129b33..42468d6f50add651d4d9797454896be309fb638e 100644 (file)
@@ -846,11 +846,7 @@ vlc_module_begin();
                  SUB_AUTO_TEXT, SUB_AUTO_LONGTEXT, VLC_FALSE );
     add_integer( "sub-autodetect-fuzzy", 3, NULL,
                  SUB_FUZZY_TEXT, SUB_FUZZY_LONGTEXT, VLC_TRUE );
-#if defined( WIN32 )
-    add_string( "sub-autodetect-path", ".\\subtitles", NULL,
-#else
     add_string( "sub-autodetect-path", "./Subtitles, ./subtitles", NULL,
-#endif
                  SUB_PATH_TEXT, SUB_PATH_LONGTEXT, VLC_TRUE );
     add_file( "sub-file", NULL, NULL,
                  SUB_FILE_TEXT, SUB_FILE_LONGTEXT, VLC_TRUE );
index 4af16a89a127db991c8526040d9aaac0c223848e..b5929309e67d405500e8349bf4f5a55572f9c75f 100644 (file)
@@ -1268,7 +1268,7 @@ static void httpd_ClientInit( httpd_client_t *cl )
 {
     cl->i_state = HTTPD_CLIENT_RECEIVING;
     cl->i_activity_date = mdate();
-    cl->i_activity_timeout = 50000000LL;
+    cl->i_activity_timeout = 50000000;
     cl->i_buffer_size = 10000;
     cl->i_buffer = 0;
     cl->p_buffer = malloc( cl->i_buffer_size );
@@ -1933,11 +1933,13 @@ static void httpd_HostThread( httpd_host_t *host )
                                 if( answer && ( *url->psz_user || *url->psz_password ) )
                                 {
                                     /* create the headers */
-                                    char id[strlen(url->psz_user)+strlen(url->psz_password) + 2];
                                     char *b64 = httpd_MsgGet( query, "Authorization" ); /* BASIC id */
-                                    char auth[strlen(b64) +1];
+                                    char *auth;
+                                    char *id;
+
+                                    asprintf( &id, "%s:%s", url->psz_user, url->psz_password );
+                                    auth = malloc( strlen(b64) + 1 );
 
-                                    sprintf( id, "%s:%s", url->psz_user, url->psz_password );
                                     if( !strncasecmp( b64, "BASIC", 5 ) )
                                     {
                                         b64 += 5;
@@ -1956,8 +1958,13 @@ static void httpd_HostThread( httpd_host_t *host )
                                         httpd_MsgAdd( answer, "WWW-Authenticate", "Basic realm=\"%s\"", url->psz_user );
                                         /* We fail for all url */
                                         b_auth_failed = VLC_TRUE;
+                                        free( id );
+                                        free( auth );
                                         break;
                                     }
+
+                                    free( id );
+                                    free( auth );
                                 }
 
                                 if( !url->catch[i_msg].cb( url->catch[i_msg].p_sys, cl, answer, query ) )
index a89d44cf38f741f2993d71c7c423fcf736841f91..df67982a4fb1f34d1eef2bcb2067c385e3589fcf 100644 (file)
@@ -2,7 +2,7 @@
  * announce.c : announce handler
  *****************************************************************************
  * Copyright (C) 2002-2004 VideoLAN
- * $Id: stream_output.c 7307 2004-04-07 23:13:03Z zorglub $
+ * $Id$
  *
  * Authors: ClĂ©ment Stenac <zorglub@videolan.org>
  *
@@ -277,8 +277,8 @@ int announce_Register( announce_handler_t *p_announce,
         /* Do we already have a SAP announce handler ? */
         if( !p_announce->p_sap )
         {
-            msg_Dbg( p_announce, "creating SAP announce handler");
             sap_handler_t *p_sap = announce_SAPHandlerCreate( p_announce );
+            msg_Dbg( p_announce, "creating SAP announce handler");
             if( !p_sap )
             {
                 msg_Err( p_announce, "SAP handler creation failed" );