[svn r711] Showing more UPnP info. trunk
authorrosfran
Thu May 24 01:25:19 2007 +0100 (2007-05-24)
branchtrunk
changeset 70548d1f2628be1
parent 704 5b6a77d85cf7
child 706 5cc97240e238
[svn r711] Showing more UPnP info.
gmyth/samples/Makefile.am
gmyth/samples/gmyth_upnp_search.c
gmyth/src/gmyth_file_transfer.c
     1.1 --- a/gmyth/samples/Makefile.am	Wed May 23 21:49:19 2007 +0100
     1.2 +++ b/gmyth/samples/Makefile.am	Thu May 24 01:25:19 2007 +0100
     1.3 @@ -28,6 +28,7 @@
     1.4          -I$(top_srcdir)/src \
     1.5          $(GLIB_CFLAGS) \
     1.6          $(GOBJECT_CFLAGS)
     1.7 +
     1.8  if HAVE_UPNP
     1.9  INCLUDES += \
    1.10  	$(UPNP_CFLAGS)
     2.1 --- a/gmyth/samples/gmyth_upnp_search.c	Wed May 23 21:49:19 2007 +0100
     2.2 +++ b/gmyth/samples/gmyth_upnp_search.c	Thu May 24 01:25:19 2007 +0100
     2.3 @@ -71,9 +71,10 @@
     2.4  
     2.5  
     2.6  static void
     2.7 -_got_upnp_device( GMythUPnPDeviceStatus status, gchar *udn )
     2.8 +_got_upnp_device( GMythUPnP *gupnp, GMythUPnPDeviceStatus status, gchar *udn )
     2.9  {
    2.10 -	g_print( "Got Device !!! [%d, %s]", status, udn );
    2.11 +	g_debug( "Got Device !!! [%s, %s]", gmyth_upnp_device_status_to_string( status ), 
    2.12 +			udn );
    2.13  }
    2.14  
    2.15  static gboolean
     3.1 --- a/gmyth/src/gmyth_file_transfer.c	Wed May 23 21:49:19 2007 +0100
     3.2 +++ b/gmyth/src/gmyth_file_transfer.c	Thu May 24 01:25:19 2007 +0100
     3.3 @@ -843,21 +843,26 @@
     3.4              retval = GMYTH_FILE_READ_NEXT_PROG_CHAIN;
     3.5              GMythProgramInfo *prog_info =
     3.6                  gmyth_recorder_get_current_program_info ( priv->recorder );
     3.7 +	      
     3.8 +	    gmyth_debug( "Comparing if the current prog. info = %s [strlen == %d] is equals to " \
     3.9 +	    	" %s [strlen == %d]...", 
    3.10 +	    	prog_info->pathname->str, strlen ( prog_info->pathname->str ), 
    3.11 +		gmyth_file_get_file_name( GMYTH_FILE( transfer ) ), 
    3.12 +		strlen( gmyth_file_get_file_name( GMYTH_FILE( transfer ) ) ) );
    3.13  
    3.14              if ( prog_info != NULL && prog_info->pathname != NULL
    3.15                   && strlen ( prog_info->pathname->str ) > 0
    3.16 -                 && g_ascii_strcasecmp ( prog_info->pathname->str,
    3.17 -                                         gmyth_file_get_file_name ( GMYTH_FILE
    3.18 -                                                                    ( transfer ) ) )
    3.19 -                 != 0 )
    3.20 -
    3.21 +                 && ( NULL == g_strstr_len( prog_info->pathname->str, strlen( prog_info->pathname->str ),
    3.22 +                                         gmyth_file_get_file_name ( 
    3.23 +					 	GMYTH_FILE( transfer ) ) ) ) )
    3.24 +	    {
    3.25                  /* releasing context got at this function starting... */
    3.26                  _control_release_context ( transfer );
    3.27              ret =
    3.28                  gmyth_file_transfer_open ( transfer,
    3.29                                             g_strrstr ( prog_info->pathname->str,
    3.30                                                         "/" ) );
    3.31 -            _control_acquire_context ( transfer, TRUE );
    3.32 +	    _control_acquire_context ( transfer, TRUE );
    3.33              /* acquiring context released at this function stopping... */
    3.34  
    3.35              if ( prog_info != NULL )
    3.36 @@ -869,10 +874,12 @@
    3.37                  gmyth_debug ( "OK!!! MOVED to the next program info [%s]!",
    3.38                                gmyth_file_get_file_name ( GMYTH_FILE
    3.39                                                           ( transfer ) ) );
    3.40 -        }
    3.41 +           }
    3.42  
    3.43 -    }
    3.44 -    /* if */
    3.45 +	}
    3.46 +
    3.47 +    } /* if */
    3.48 +
    3.49    error:
    3.50  
    3.51      _control_release_context ( transfer );
    3.52 @@ -989,3 +996,4 @@
    3.53  
    3.54      return filesize;
    3.55  }
    3.56 +