# HG changeset patch # User melunko # Date 1170279885 0 # Node ID 3b575d136efe2918b7f84c30e81d02488f3e52c6 # Parent 43dc23e931b623da31160b3a8212cc3c8f1ded90 [svn r318] Fixed looping bug in the mythtv gnomevfs module. The file transfer requests were just 4kbytes, and the looping was a deadlock diff -r 43dc23e931b6 -r 3b575d136efe libgnomevfs2-mythtv/modules/mythtv-method.c --- a/libgnomevfs2-mythtv/modules/mythtv-method.c Tue Jan 30 22:27:59 2007 +0000 +++ b/libgnomevfs2-mythtv/modules/mythtv-method.c Wed Jan 31 21:44:45 2007 +0000 @@ -189,10 +189,12 @@ /* Loop sending the Myth File Transfer request: * Retry whilst authentication fails and we supply it. */ - if ((myth_handle->buffer_remain = myth_handle->buffer->len) < MYTHTV_BUFFER_SIZE) { - //if ( bytes_to_read > myth_handle->buffer_remain ) { + //if (myth_handle->buffer_remain < MYTHTV_BUFFER_SIZE) { + if ( bytes_to_read > myth_handle->buffer_remain ) { GByteArray *tmp_buffer = g_byte_array_new(); + printf ("XXXXXXXXXXXXXX Pedindo %d %d\n", MYTHTV_BUFFER_SIZE, myth_handle->buffer_remain); + gint len = gmyth_file_transfer_read (myth_handle->file_transfer, tmp_buffer, MYTHTV_BUFFER_SIZE - myth_handle->buffer_remain, TRUE);