#include <vlc_input.h>
#include <stdbool.h>
-#include <sys/stat.h>
#include <errno.h>
-#include <fcntl.h>
-
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
msg_Info( p_intf, "using the VLM interface plugin..." );
- i_telnetport = config_GetInt( p_intf, "telnet-port" );
- psz_address = config_GetPsz( p_intf, "telnet-host" );
-
+ i_telnetport = var_InheritInteger( p_intf, "telnet-port" );
+ psz_address = var_InheritString( p_intf, "telnet-host" );
vlc_UrlParse(&url, psz_address, 0);
free( psz_address );
nlisten++; /* How many listening sockets do we have? */
/* FIXME: make sure config_* is cancel-safe */
- psz_password = config_GetPsz( p_intf, "telnet-password" );
+ psz_password = var_InheritString( p_intf, "telnet-password" );
vlc_cleanup_push( free, psz_password );
for( ;; )
if (net_errno != EINTR)
{
msg_Err (p_intf, "network poll error");
- msleep (1000);
- continue;
+#ifndef WIN32
+ pause (); /* We are screwed! */
+#else
+ abort (); /* We are even more screwed! (no pause() in win32) */
+#endif
+ break;
}
case 0:
continue;
}
i_message += strlen( message->psz_name ) + i_level * sizeof( " " ) + 1;
- psz_message = malloc( i_message );
+ psz_message = xmalloc( i_message );
*psz_message = 0;
for( i = 0; i < i_level; i++ ) strcat( psz_message, " " );
strcat( psz_message, message->psz_name );
{
i_message += sizeof( " : " ) + strlen( message->psz_value ) +
sizeof( STRING_CR );
- psz_message = realloc( psz_message, i_message );
+ psz_message = xrealloc( psz_message, i_message );
strcat( psz_message, " : " );
strcat( psz_message, message->psz_value );
strcat( psz_message, STRING_CR );
else
{
i_message += sizeof( STRING_CR );
- psz_message = realloc( psz_message, i_message );
+ psz_message = xrealloc( psz_message, i_message );
strcat( psz_message, STRING_CR );
}
MessageToString( message->child[i], i_level + 1 );
i_message += strlen( child_message );
- psz_message = realloc( psz_message, i_message );
+ psz_message = xrealloc( psz_message, i_message );
strcat( psz_message, child_message );
free( child_message );
}