# HG changeset patch # User rosfran # Date 1179966319 -3600 # Node ID 48d1f2628be16a362a1c2a19a5c8b8be0a877e3b # Parent 5b6a77d85cf7578405795989c931bae975b39707 [svn r711] Showing more UPnP info. diff -r 5b6a77d85cf7 -r 48d1f2628be1 gmyth/samples/Makefile.am --- a/gmyth/samples/Makefile.am Wed May 23 21:49:19 2007 +0100 +++ b/gmyth/samples/Makefile.am Thu May 24 01:25:19 2007 +0100 @@ -28,6 +28,7 @@ -I$(top_srcdir)/src \ $(GLIB_CFLAGS) \ $(GOBJECT_CFLAGS) + if HAVE_UPNP INCLUDES += \ $(UPNP_CFLAGS) diff -r 5b6a77d85cf7 -r 48d1f2628be1 gmyth/samples/gmyth_upnp_search.c --- a/gmyth/samples/gmyth_upnp_search.c Wed May 23 21:49:19 2007 +0100 +++ b/gmyth/samples/gmyth_upnp_search.c Thu May 24 01:25:19 2007 +0100 @@ -71,9 +71,10 @@ static void -_got_upnp_device( GMythUPnPDeviceStatus status, gchar *udn ) +_got_upnp_device( GMythUPnP *gupnp, GMythUPnPDeviceStatus status, gchar *udn ) { - g_print( "Got Device !!! [%d, %s]", status, udn ); + g_debug( "Got Device !!! [%s, %s]", gmyth_upnp_device_status_to_string( status ), + udn ); } static gboolean diff -r 5b6a77d85cf7 -r 48d1f2628be1 gmyth/src/gmyth_file_transfer.c --- a/gmyth/src/gmyth_file_transfer.c Wed May 23 21:49:19 2007 +0100 +++ b/gmyth/src/gmyth_file_transfer.c Thu May 24 01:25:19 2007 +0100 @@ -843,21 +843,26 @@ retval = GMYTH_FILE_READ_NEXT_PROG_CHAIN; GMythProgramInfo *prog_info = gmyth_recorder_get_current_program_info ( priv->recorder ); + + gmyth_debug( "Comparing if the current prog. info = %s [strlen == %d] is equals to " \ + " %s [strlen == %d]...", + prog_info->pathname->str, strlen ( prog_info->pathname->str ), + gmyth_file_get_file_name( GMYTH_FILE( transfer ) ), + strlen( gmyth_file_get_file_name( GMYTH_FILE( transfer ) ) ) ); if ( prog_info != NULL && prog_info->pathname != NULL && strlen ( prog_info->pathname->str ) > 0 - && g_ascii_strcasecmp ( prog_info->pathname->str, - gmyth_file_get_file_name ( GMYTH_FILE - ( transfer ) ) ) - != 0 ) - + && ( NULL == g_strstr_len( prog_info->pathname->str, strlen( prog_info->pathname->str ), + gmyth_file_get_file_name ( + GMYTH_FILE( transfer ) ) ) ) ) + { /* releasing context got at this function starting... */ _control_release_context ( transfer ); ret = gmyth_file_transfer_open ( transfer, g_strrstr ( prog_info->pathname->str, "/" ) ); - _control_acquire_context ( transfer, TRUE ); + _control_acquire_context ( transfer, TRUE ); /* acquiring context released at this function stopping... */ if ( prog_info != NULL ) @@ -869,10 +874,12 @@ gmyth_debug ( "OK!!! MOVED to the next program info [%s]!", gmyth_file_get_file_name ( GMYTH_FILE ( transfer ) ) ); - } + } - } - /* if */ + } + + } /* if */ + error: _control_release_context ( transfer ); @@ -989,3 +996,4 @@ return filesize; } +