]> git.sesse.net Git - vlc/commitdiff
* all: forgot to commit theses files.
authorLaurent Aimar <fenrir@videolan.org>
Mon, 22 Mar 2004 12:33:29 +0000 (12:33 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Mon, 22 Mar 2004 12:33:29 +0000 (12:33 +0000)
include/vlc_httpd.h
src/misc/httpd.c

index cd95b7f6fbe0e17ef0a5aa728227a6e70666ee7b..9738d9217d70ace0c8b5f33295fa6da822a775a4 100644 (file)
@@ -2,7 +2,7 @@
  * vlc_httpd.h: builtin HTTP/RTSP server.
  *****************************************************************************
  * Copyright (C) 2004 VideoLAN
- * $Id: vlc_httpd.h,v 1.1 2004/03/03 13:23:47 fenrir Exp $
+ * $Id$
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
@@ -127,6 +127,7 @@ VLC_EXPORT( void,           httpd_UrlDelete, ( httpd_url_t * ) );
 /* Default client mode is FILE, use these to change it */
 VLC_EXPORT( void,           httpd_ClientModeStream, ( httpd_client_t *cl ) );
 VLC_EXPORT( void,           httpd_ClientModeBidir, ( httpd_client_t *cl ) );
+VLC_EXPORT( char*,          httpd_ClientIP, ( httpd_client_t *cl ) );
 
 /* High level */
 
index 3c81ce5c31f5cf7bbeb2a3f7ec2404ab76a1b956..fb8883c5d9a6061f09ec80d97d0808eeba2b2fd4 100644 (file)
@@ -1267,7 +1267,7 @@ static void httpd_ClientInit( httpd_client_t *cl )
 {
     cl->i_state = HTTPD_CLIENT_RECEIVING;
     cl->i_activity_date = mdate();
-    cl->i_activity_timeout = 10000000LL;
+    cl->i_activity_timeout = 50000000LL;
     cl->i_buffer_size = 10000;
     cl->i_buffer = 0;
     cl->p_buffer = malloc( cl->i_buffer_size );
@@ -1288,6 +1288,12 @@ void httpd_ClientModeBidir( httpd_client_t *cl )
     cl->i_mode   = HTTPD_CLIENT_BIDIR;
 }
 
+char* httpd_ClientIP( httpd_client_t *cl )
+{
+    /* FIXME not thread safe */
+    return strdup( inet_ntoa( cl->sock.sin_addr ) );
+}
+
 static void httpd_ClientClean( httpd_client_t *cl )
 {
     if( cl->fd > 0 )