Browse Source

Fixed HTTP input under Win32 (thanks ipkiss).

pull/2/head
Christophe Massiot 25 years ago
parent
commit
64845e08f5
  1. 1
      Makefile.opts.in
  2. 607
      configure
  3. 2
      configure.in
  4. 16
      plugins/access/http.c

1
Makefile.opts.in

@ -102,6 +102,7 @@ ggi_LDFLAGS = @ggi_LDFLAGS@
glide_LDFLAGS = @glide_LDFLAGS@
gnome_LDFLAGS = @gnome_LDFLAGS@
gtk_LDFLAGS = @gtk_LDFLAGS@
http_LDFLAGS = @http_LDFLAGS@
idctaltivec_LDFLAGS = @idctaltivec_LDFLAGS@
imdct_LDFLAGS = @imdct_LDFLAGS@
imdct3dn_LDFLAGS = @imdct3dn_LDFLAGS@

607
configure

File diff suppressed because it is too large

2
configure.in

@ -80,6 +80,7 @@ case x"${target_os}" in
vlc_LDFLAGS="${vlc_LDFLAGS} -lws2_32 -lnetapi32"
ipv4_LDFLAGS="${ipv4_LDFLAGS} -lws2_32"
ipv6_LDFLAGS="${ipv6_LDFLAGS} -lws2_32"
http_LDFLAGS="${http_LDFLAGS} -lws2_32"
rc_LDFLAGS="${rc_LDFLAGS} -lws2_32"
;;
x*nto*)
@ -1702,6 +1703,7 @@ AC_SUBST(ggi_LDFLAGS)
AC_SUBST(glide_LDFLAGS)
AC_SUBST(gnome_LDFLAGS)
AC_SUBST(gtk_LDFLAGS)
AC_SUBST(http_LDFLAGS)
AC_SUBST(idctaltivec_LDFLAGS)
AC_SUBST(imdct_LDFLAGS)
AC_SUBST(imdct3dn_LDFLAGS)

16
plugins/access/http.c

@ -2,7 +2,7 @@
* http.c: HTTP access plug-in
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: http.c,v 1.9 2002/05/15 13:07:18 marcari Exp $
* $Id: http.c,v 1.10 2002/05/22 23:11:00 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
@ -39,6 +39,16 @@
# include <io.h>
#endif
#ifdef WIN32
# include <winsock2.h>
# include <ws2tcpip.h>
# ifndef IN_MULTICAST
# define IN_MULTICAST(a) IN_CLASSD(a)
# endif
#else
# include <sys/socket.h>
#endif
#include "stream_control.h"
#include "input_ext-intf.h"
#include "input_ext-dec.h"
@ -140,8 +150,8 @@ static int HTTPConnect( input_thread_t * p_input, off_t i_tell )
psz_buffer[sizeof(psz_buffer) - 1] = '\0';
/* Send GET ... */
if( write( p_access_data->_socket.i_handle, psz_buffer,
strlen( psz_buffer ) ) == (-1) )
if( send( p_access_data->_socket.i_handle, psz_buffer,
strlen( psz_buffer ), 0 ) == (-1) )
{
intf_ErrMsg( "http error: cannot send request (%s)", strerror(errno) );
input_FDNetworkClose( p_input );

Loading…
Cancel
Save