# HG changeset patch # User melunko # Date 1164404980 0 # Node ID 7dcc53d63f370ac52da2e01ba183d4874d1c4f33 # Parent a99f881ed02fba42596d93d6e568845f5ddb0053 [svn r114] Fixed function definition error diff -r a99f881ed02f -r 7dcc53d63f37 gmyth/src/gmyth_file_transfer.c --- a/gmyth/src/gmyth_file_transfer.c Fri Nov 24 21:43:04 2006 +0000 +++ b/gmyth/src/gmyth_file_transfer.c Fri Nov 24 21:49:40 2006 +0000 @@ -148,8 +148,6 @@ static void gmyth_file_transfer_dispose (GObject *object) { - GMythFileTransfer *gmyth_file_transfer = GMYTH_FILE_TRANSFER(object); - G_OBJECT_CLASS (gmyth_file_transfer_parent_class)->dispose (object); } @@ -237,52 +235,6 @@ gmyth_socket_write_stringlist (transfer->sock, strlist ); gmyth_socket_read_stringlist (transfer->sock, strlist ); - GIOChannel* io_channel = (*transfer)->sock->sd_io_ch, - *io_channel_control = (*transfer)->control_sock->sd_io_ch; - GIOCondition io_cond, io_cond_control; - GIOStatus io_status = G_IO_STATUS_NORMAL; - GError *error = NULL; - gchar *trash = NULL; - guint bytes_read = 0; - - io_cond = g_io_channel_get_buffer_condition( io_channel ); - - if ( ( io_cond & G_IO_IN ) != 0 ) { - do - { - trash = g_new0( gchar, GMYTHTV_BUFFER_SIZE ); - - io_status = g_io_channel_read_chars( io_channel, trash, - GMYTHTV_BUFFER_SIZE, &bytes_read, &error); - - g_print( "[%s] cleaning buffer on IO binary channel... %d bytes gone!\n", - __FUNCTION__, bytes_read ); - - if ( trash != NULL ) - g_free( trash ); - - io_cond = g_io_channel_get_buffer_condition( io_channel ); - - } while ( ( io_cond & G_IO_IN ) != 0 && ( io_status != G_IO_STATUS_ERROR ) && (error == NULL) ); - - } - - io_cond_control = g_io_channel_get_buffer_condition( io_channel_control ); - - if ( ( io_cond_control & G_IO_IN ) != 0 ) { - g_print( "[%s] Finishind reading function: cleaning all data on the I/O control socket...\n", __FUNCTION__ ); - while ( gmyth_socket_read_stringlist( (*transfer)->control_sock, strlist ) > 0 ) - { - if ( strlist != NULL && gmyth_string_list_length(strlist) > 0 ) - { - gint backend_code = gmyth_string_list_get_int( strlist, 0 ); // -1 on backend error - g_print( "[%s]\t backend code = %d -\t"\ - "[%s prepared for reading]! (G_IO_IN) !!!\n\n", __FUNCTION__, - backend_code, ( ( io_cond & G_IO_IN ) != 0 ) ? "IS" : "IS NOT" ); - } - } - } - /* file identification used in future file transfer requests to backend */ transfer->file_id = gmyth_string_list_get_int( strlist, 1 ); @@ -458,7 +410,7 @@ } gint -gmyth_file_transfer_read(GMythFileTransfer *transfer, GByteArray *data, gint size, gboolean read_unlimited) +gmyth_file_transfer_read(GMythFileTransfer *transfer, void *data, gint size, gboolean read_unlimited) { gsize bytes_sent = 0; gsize bytes_read = 0;