[svn r486] fixed bug on filetransfer trunk
authorrenatofilho
Tue Apr 03 14:56:51 2007 +0100 (2007-04-03)
branchtrunk
changeset 4816d00c497a403
parent 480 f6fc378c70e5
child 482 bf3ac902013e
[svn r486] fixed bug on filetransfer
gmyth/src/gmyth_file_transfer.c
gmyth/src/gmyth_livetv.c
     1.1 --- a/gmyth/src/gmyth_file_transfer.c	Mon Apr 02 20:48:43 2007 +0100
     1.2 +++ b/gmyth/src/gmyth_file_transfer.c	Tue Apr 03 14:56:51 2007 +0100
     1.3 @@ -93,6 +93,7 @@
     1.4  	
     1.5  	gboolean do_next_program_chain;
     1.6  	gboolean disposed;
     1.7 +    gboolean livetv_wait;
     1.8  };
     1.9  
    1.10  static void gmyth_file_transfer_class_init          (GMythFileTransferClass *klass);
    1.11 @@ -294,7 +295,7 @@
    1.12    }
    1.13    
    1.14    gmyth_debug ("Got file with size = %lld.\n", transfer->filesize);
    1.15 -  
    1.16 +
    1.17    return ret;
    1.18  }
    1.19  
    1.20 @@ -685,7 +686,7 @@
    1.21    g_string_append_printf ( query, "%d", transfer->file_id );
    1.22    gmyth_debug ("[%s] Transfer_query = %s\n", __FUNCTION__, query->str );
    1.23    
    1.24 -  myth_control_acquire_context( transfer, TRUE );
    1.25 +  //myth_control_acquire_context( transfer, TRUE );
    1.26    
    1.27    while (total_read != size) {
    1.28      GMythStringList *strlist = gmyth_string_list_new();
    1.29 @@ -752,7 +753,10 @@
    1.30  
    1.31      if ((total_read < size) && read_unlimited) {
    1.32          /* wait for more data */
    1.33 -        g_usleep (300);
    1.34 +        g_usleep (3 * G_USEC_PER_SEC);
    1.35 +    } else  if (total_read < size) {
    1.36 +        gmyth_debug ("EOF");
    1.37 +        break;
    1.38      }
    1.39  
    1.40    } /* while - iterates through bytes until reaches the end of stream */
    1.41 @@ -787,7 +791,7 @@
    1.42  
    1.43    } /* if */
    1.44    
    1.45 -  myth_control_release_context( transfer );
    1.46 +  //myth_control_release_context( transfer );
    1.47    g_string_free (query, TRUE);
    1.48  
    1.49    if ( error != NULL ) {
     2.1 --- a/gmyth/src/gmyth_livetv.c	Mon Apr 02 20:48:43 2007 +0100
     2.2 +++ b/gmyth/src/gmyth_livetv.c	Tue Apr 03 14:56:51 2007 +0100
     2.3 @@ -469,7 +469,6 @@
     2.4      	  	}
     2.5  	
     2.6  		} /* if - changes the channel number */
     2.7 -		
     2.8      sleep (4);                  /* FIXME: this is evil (tpm) */
     2.9    }
    2.10