# HG changeset patch # User renatofilho # Date 1175608611 -3600 # Node ID 6d00c497a403cc91688c488b6415c67b80052071 # Parent f6fc378c70e543e530d7339478f2ef69e6bc25f5 [svn r486] fixed bug on filetransfer diff -r f6fc378c70e5 -r 6d00c497a403 gmyth/src/gmyth_file_transfer.c --- a/gmyth/src/gmyth_file_transfer.c Mon Apr 02 20:48:43 2007 +0100 +++ b/gmyth/src/gmyth_file_transfer.c Tue Apr 03 14:56:51 2007 +0100 @@ -93,6 +93,7 @@ gboolean do_next_program_chain; gboolean disposed; + gboolean livetv_wait; }; static void gmyth_file_transfer_class_init (GMythFileTransferClass *klass); @@ -294,7 +295,7 @@ } gmyth_debug ("Got file with size = %lld.\n", transfer->filesize); - + return ret; } @@ -685,7 +686,7 @@ g_string_append_printf ( query, "%d", transfer->file_id ); gmyth_debug ("[%s] Transfer_query = %s\n", __FUNCTION__, query->str ); - myth_control_acquire_context( transfer, TRUE ); + //myth_control_acquire_context( transfer, TRUE ); while (total_read != size) { GMythStringList *strlist = gmyth_string_list_new(); @@ -752,7 +753,10 @@ if ((total_read < size) && read_unlimited) { /* wait for more data */ - g_usleep (300); + g_usleep (3 * G_USEC_PER_SEC); + } else if (total_read < size) { + gmyth_debug ("EOF"); + break; } } /* while - iterates through bytes until reaches the end of stream */ @@ -787,7 +791,7 @@ } /* if */ - myth_control_release_context( transfer ); + //myth_control_release_context( transfer ); g_string_free (query, TRUE); if ( error != NULL ) { diff -r f6fc378c70e5 -r 6d00c497a403 gmyth/src/gmyth_livetv.c --- a/gmyth/src/gmyth_livetv.c Mon Apr 02 20:48:43 2007 +0100 +++ b/gmyth/src/gmyth_livetv.c Tue Apr 03 14:56:51 2007 +0100 @@ -469,7 +469,6 @@ } } /* if - changes the channel number */ - sleep (4); /* FIXME: this is evil (tpm) */ }