diff -r 08c4bc759e7a -r 73fa3a0f2f08 libgnomevfs2-mythtv/modules/mythtv-method.c --- a/libgnomevfs2-mythtv/modules/mythtv-method.c Fri Jan 19 18:39:37 2007 +0000 +++ b/libgnomevfs2-mythtv/modules/mythtv-method.c Tue Jan 23 21:37:27 2007 +0000 @@ -151,20 +151,6 @@ g_warning ("MythTV FileTransfer open error\n"); return GNOME_VFS_ERROR_NOT_OPEN; } - - if ( is_livetv == TRUE && ret == TRUE ) { - /* loop finished, set the max tries variable to zero again... */ - wait_to_transfer = 0; - - while ( wait_to_transfer++ < MYTHTV_TRANSFER_MAX_WAITS && - (gmyth_livetv_is_recording (myth_handle->livetv) == FALSE)) - g_usleep (500); - - /* IS_RECORDING again, just like the MythTV backend does... */ - gmyth_livetv_is_recording (myth_handle->livetv); - - sleep (4); /* FIXME: this is evil (tpm) */ - } g_object_unref (backend_info); @@ -204,8 +190,8 @@ /* Loop sending the Myth File Transfer request: * Retry whilst authentication fails and we supply it. */ - - if ( bytes_to_read > myth_handle->buffer_remain ) { + if ((myth_handle->buffer_remain = myth_handle->buffer->len) < MYTHTV_BUFFER_SIZE) { + //if ( bytes_to_read > myth_handle->buffer_remain ) { GByteArray *tmp_buffer = g_byte_array_new(); gint len = gmyth_file_transfer_read (myth_handle->file_transfer, @@ -215,11 +201,11 @@ g_byte_array_free (tmp_buffer, TRUE); g_warning ("Fail to read bytes"); return GNOME_VFS_ERROR_IO; - } else if (len == 0) { + } /*else if (len == 0) { g_byte_array_free (tmp_buffer, TRUE); g_warning ("End of file probably achieved"); return GNOME_VFS_ERROR_EOF; - } + }*/ myth_handle->buffer = g_byte_array_append (myth_handle->buffer, tmp_buffer->data, len);