# HG changeset patch # User melunko # Date 1169154194 0 # Node ID ed5172cf0f1b30a6a4505a071cc8f9c4c176cfd5 # Parent d2192075f563a5810a8f012572853924d648c8c6 [svn r277] Fixed gmyth_socket_new() interface change diff -r d2192075f563 -r ed5172cf0f1b gmyth/src/gmyth_file_transfer.c --- a/gmyth/src/gmyth_file_transfer.c Thu Jan 18 20:51:59 2007 +0000 +++ b/gmyth/src/gmyth_file_transfer.c Thu Jan 18 21:03:14 2007 +0000 @@ -282,7 +282,7 @@ transfer->control_sock = NULL; } - transfer->control_sock = gmyth_socket_new(6543); + transfer->control_sock = gmyth_socket_new(); // Connects the socket, send Mythtv ANN command and verify Mythtv protocol version if (!gmyth_socket_connect_to_backend (transfer->control_sock, @@ -299,7 +299,7 @@ transfer->sock = NULL; } - transfer->sock = gmyth_socket_new (6543); + transfer->sock = gmyth_socket_new (); gmyth_socket_connect (transfer->sock, transfer->backend_info->hostname, transfer->backend_info->port); strlist = gmyth_string_list_new(); diff -r d2192075f563 -r ed5172cf0f1b gmyth/src/gmyth_livetv.c --- a/gmyth/src/gmyth_livetv.c Thu Jan 18 20:51:59 2007 +0000 +++ b/gmyth/src/gmyth_livetv.c Thu Jan 18 21:03:14 2007 +0000 @@ -235,7 +235,7 @@ { gboolean res = TRUE; - GMythSocket *socket = gmyth_socket_new (6543); + GMythSocket *socket = gmyth_socket_new (); livetv->backend_info = backend_info; diff -r d2192075f563 -r ed5172cf0f1b gmyth/src/gmyth_monitor_handler.c --- a/gmyth/src/gmyth_monitor_handler.c Thu Jan 18 20:51:59 2007 +0000 +++ b/gmyth/src/gmyth_monitor_handler.c Thu Jan 18 21:03:14 2007 +0000 @@ -475,7 +475,7 @@ { gboolean ret = TRUE; - monitor->event_sock = gmyth_socket_new(6543); + monitor->event_sock = gmyth_socket_new(); /* Connects the socket, send Mythtv ANN Monitor and verify Mythtv protocol version */ if (!gmyth_socket_connect_to_backend_events ( monitor->event_sock, diff -r d2192075f563 -r ed5172cf0f1b gmyth/src/gmyth_recorder.c --- a/gmyth/src/gmyth_recorder.c Thu Jan 18 20:51:59 2007 +0000 +++ b/gmyth/src/gmyth_recorder.c Thu Jan 18 21:03:14 2007 +0000 @@ -118,7 +118,7 @@ if (recorder->myth_socket == NULL) { - recorder->myth_socket = gmyth_socket_new (6543); + recorder->myth_socket = gmyth_socket_new (); if (!gmyth_socket_connect_to_backend ( recorder->myth_socket, recorder->hostname->str, recorder->port, TRUE ) ) { diff -r d2192075f563 -r ed5172cf0f1b gmyth/src/gmyth_scheduler.c --- a/gmyth/src/gmyth_scheduler.c Thu Jan 18 20:51:59 2007 +0000 +++ b/gmyth/src/gmyth_scheduler.c Thu Jan 18 21:03:14 2007 +0000 @@ -624,7 +624,7 @@ g_string_append_printf (datastr, "%d", record_id); gmyth_string_list_append_string (strlist, datastr); - socket = gmyth_socket_new (6543); + socket = gmyth_socket_new (); if (gmyth_socket_connect (socket, scheduler->backend_info->hostname, scheduler->backend_info->port)) { gmyth_socket_sendreceive_stringlist (socket, strlist); diff -r d2192075f563 -r ed5172cf0f1b gmyth/src/gmyth_socket.c --- a/gmyth/src/gmyth_socket.c Thu Jan 18 20:51:59 2007 +0000 +++ b/gmyth/src/gmyth_socket.c Thu Jan 18 21:03:14 2007 +0000 @@ -408,12 +408,10 @@ * @return a new instance of GMythSocket. */ GMythSocket* -gmyth_socket_new (int port) +gmyth_socket_new () { GMythSocket *gmyth_socket = GMYTH_SOCKET (g_object_new(GMYTH_SOCKET_TYPE, NULL)); - gmyth_socket->port = port; - gmyth_socket->mythtv_version = MYTHTV_VERSION_DEFAULT; return gmyth_socket; @@ -473,7 +471,6 @@ FD_ZERO( &fd_w ); FD_SET( fd, &fd_w ); - gmyth_debug ("xxxxxxxxxxxx %ld\n", timeout->tv_sec); *err = select( FD_SETSIZE, NULL, &fd_w, NULL, timeout); if ( *err < 0 ) { g_warning( "[%s] Connection unsucessfull (timed out).\n", __FUNCTION__ ); @@ -565,12 +562,10 @@ /*timeout_val = g_new0 (struct timeval, 1);*/ timeout_val->tv_sec = timeout; - gmyth_debug ("XXXXXXXXXXX setting timeout %ld\n", timeout_val->tv_sec); timeout_val->tv_usec = 0; } else { - timeout_val->tv_sec = 5; - gmyth_debug ("XXXXXXXXXXX timeout is ZERO. Setting timeout to the default value of 5 seconds, 100 microseconds -> %ld\n", timeout_val->tv_sec); - timeout_val->tv_usec = 100; + timeout_val->tv_sec = 5; + timeout_val->tv_usec = 100; } if (gmyth_socket_try_connect (gmyth_socket->sd, (struct sockaddr *)addr_info0->ai_addr, diff -r d2192075f563 -r ed5172cf0f1b gmyth/src/gmyth_socket.h --- a/gmyth/src/gmyth_socket.h Thu Jan 18 20:51:59 2007 +0000 +++ b/gmyth/src/gmyth_socket.h Thu Jan 18 21:03:14 2007 +0000 @@ -82,7 +82,7 @@ GType gmyth_socket_get_type (void); -GMythSocket * gmyth_socket_new (gint port); +GMythSocket * gmyth_socket_new (); gboolean gmyth_socket_connect (GMythSocket *gmyth_socket, const gchar *hostname, gint port); diff -r d2192075f563 -r ed5172cf0f1b gmyth/src/gmyth_util.c --- a/gmyth/src/gmyth_util.c Thu Jan 18 20:51:59 2007 +0000 +++ b/gmyth/src/gmyth_util.c Thu Jan 18 21:03:14 2007 +0000 @@ -420,7 +420,7 @@ GMythSocket *socket; gboolean res; - socket = gmyth_socket_new (6543); + socket = gmyth_socket_new (); res = gmyth_socket_connect_to_backend (socket, backend_info->hostname, backend_info->port, TRUE); diff -r d2192075f563 -r ed5172cf0f1b gmyth/tests/gmyth_test_recorder.c --- a/gmyth/tests/gmyth_test_recorder.c Thu Jan 18 20:51:59 2007 +0000 +++ b/gmyth/tests/gmyth_test_recorder.c Thu Jan 18 21:03:14 2007 +0000 @@ -108,7 +108,10 @@ backend_info = gmyth_backend_info_new_with_uri (argv[1]); + printf ("******** Testing recorder availability ***********\n"); test_recorder_availability (backend_info); + + printf ("******** Testing recorder check channels function ***********\n"); test_recorder_check_channels (backend_info); }