[svn r472] Changed all the g_debug, g_warning and g_debug calls, to the gmyth_debug status/error printing function. trunk
authorrosfran
Wed Mar 28 15:53:29 2007 +0100 (2007-03-28)
branchtrunk
changeset 467bc13aaf7561d
parent 466 a7aba7d166fb
child 468 f4c6061f6f39
[svn r472] Changed all the g_debug, g_warning and g_debug calls, to the gmyth_debug status/error printing function.
gmyth/src/gmyth_epg.c
gmyth/src/gmyth_file_transfer.c
gmyth/src/gmyth_livetv.c
gmyth/src/gmyth_monitor_handler.c
gmyth/src/gmyth_recorder.c
gmyth/src/gmyth_stringlist.c
gmyth/src/gmyth_tvchain.c
     1.1 --- a/gmyth/src/gmyth_epg.c	Tue Mar 27 23:57:42 2007 +0100
     1.2 +++ b/gmyth/src/gmyth_epg.c	Wed Mar 28 15:53:29 2007 +0100
     1.3 @@ -114,7 +114,7 @@
     1.4      }
     1.5  
     1.6      if (!gmyth_query_connect(gmyth_epg->sqlquery, backend_info)) {
     1.7 -        g_warning ("[%s] Error while connecting to db", __FUNCTION__);
     1.8 +        gmyth_debug ("[%s] Error while connecting to db", __FUNCTION__);
     1.9          return FALSE;
    1.10      }
    1.11  
    1.12 @@ -158,7 +158,7 @@
    1.13      (*glist_ptr) = NULL;
    1.14  	
    1.15      if (msql_res == NULL) {
    1.16 -        g_warning ("[%s] msql query returned NULL MYSQL_RES", __FUNCTION__);
    1.17 +        gmyth_debug ("[%s] msql query returned NULL MYSQL_RES", __FUNCTION__);
    1.18  		return -1;
    1.19      } else {
    1.20          MYSQL_ROW row;
    1.21 @@ -240,7 +240,7 @@
    1.22          gmyth_query_process_statement(gmyth_epg->sqlquery, querystr->str);
    1.23  
    1.24      if (res_set == NULL) {
    1.25 -        g_warning ("[%s] msql query returned NULL MYSQL_RES", __FUNCTION__);
    1.26 +        gmyth_debug ("[%s] msql query returned NULL MYSQL_RES", __FUNCTION__);
    1.27  		return -1;
    1.28      }
    1.29  
     2.1 --- a/gmyth/src/gmyth_file_transfer.c	Tue Mar 27 23:57:42 2007 +0100
     2.2 +++ b/gmyth/src/gmyth_file_transfer.c	Wed Mar 28 15:53:29 2007 +0100
     2.3 @@ -290,7 +290,7 @@
     2.4        ret = FALSE;
     2.5      }
     2.6    } else {
     2.7 -    g_warning("Remote transfer control socket already created.\n");
     2.8 +    gmyth_debug("Remote transfer control socket already created.\n");
     2.9    }
    2.10    
    2.11    gmyth_debug ("Got file with size = %lld.\n", transfer->filesize);
     3.1 --- a/gmyth/src/gmyth_livetv.c	Tue Mar 27 23:57:42 2007 +0100
     3.2 +++ b/gmyth/src/gmyth_livetv.c	Wed Mar 28 15:53:29 2007 +0100
     3.3 @@ -374,7 +374,7 @@
     3.4  		res = gmyth_socket_connect_to_backend (livetv->socket, livetv->backend_info->hostname,
     3.5  				livetv->backend_info->port, TRUE);
     3.6  		if (!res) {
     3.7 -			g_warning ("[%s] LiveTV can not connect to backend", __FUNCTION__);	
     3.8 +			gmyth_debug ("[%s] LiveTV can not connect to backend", __FUNCTION__);	
     3.9  			res = FALSE;
    3.10  			goto error;
    3.11  		}
    3.12 @@ -411,7 +411,7 @@
    3.13  	gmyth_socket_close_connection (livetv->socket);
    3.14  
    3.15  	if ( NULL == livetv->recorder ) {
    3.16 -		g_warning ("[%s] None remote encoder available", __FUNCTION__);
    3.17 +		gmyth_debug ("[%s] None remote encoder available", __FUNCTION__);
    3.18  		res = FALSE;
    3.19  		goto error;
    3.20  	}
    3.21 @@ -419,7 +419,7 @@
    3.22  	/* Init remote encoder. Opens its control socket. */
    3.23  	res = gmyth_recorder_setup(livetv->recorder);
    3.24  	if ( !res ) {
    3.25 -		g_warning ("[%s] Fail while setting remote encoder\n", __FUNCTION__);
    3.26 +		gmyth_debug ("[%s] Fail while setting remote encoder\n", __FUNCTION__);
    3.27  		res = FALSE;
    3.28  		goto error;
    3.29  	}
    3.30 @@ -437,7 +437,7 @@
    3.31  	res = gmyth_recorder_spawntv ( livetv->recorder,
    3.32  			gmyth_tvchain_get_id(livetv->tvchain) );
    3.33  	if (!res) {
    3.34 -		g_warning ("[%s] Fail while spawn tv\n", __FUNCTION__);
    3.35 +		gmyth_debug ("[%s] Fail while spawn tv\n", __FUNCTION__);
    3.36  		res = FALSE;
    3.37  		goto error;
    3.38  	}
    3.39 @@ -455,7 +455,7 @@
    3.40  			/* Pauses remote encoder. */
    3.41  			res = gmyth_recorder_pause_recording(livetv->recorder);
    3.42  			if ( !res ) {
    3.43 -				g_warning ("[%s] Fail while pausing remote encoder\n", __FUNCTION__);
    3.44 +				gmyth_debug ("[%s] Fail while pausing remote encoder\n", __FUNCTION__);
    3.45  				res = FALSE;
    3.46  				goto error;
    3.47  			}
    3.48 @@ -535,7 +535,7 @@
    3.49  		/* Get program info from database using chanid and starttime */
    3.50  		livetv->proginfo = gmyth_tvchain_get_program_at (livetv->tvchain, tvchain_curr_index++ );
    3.51  		if ( livetv->proginfo == NULL ) {
    3.52 -			g_warning ("[%s] LiveTV not successfully started.\n", __FUNCTION__ );
    3.53 +			gmyth_debug ("[%s] LiveTV not successfully started.\n", __FUNCTION__ );
    3.54  			res = FALSE;
    3.55  			goto error;
    3.56  		} else {
    3.57 @@ -561,7 +561,7 @@
    3.58  	return res;
    3.59  
    3.60  error:
    3.61 -	g_print( "[%s] ERROR running LiveTV setup.\n", __FUNCTION__ );
    3.62 +	gmyth_debug( "[%s] ERROR running LiveTV setup.\n", __FUNCTION__ );
    3.63  
    3.64      res = FALSE;
    3.65  
    3.66 @@ -703,7 +703,7 @@
    3.67  		livetv->proginfo = prog_info;
    3.68  		gmyth_debug ("GMythLiveTV: All requests to backend to start TV were OK, program info changed.");
    3.69  	} else {
    3.70 -		g_warning ("[%s] LiveTV not successfully started on the next program chain.\n", __FUNCTION__ );
    3.71 +		gmyth_debug ("[%s] LiveTV not successfully started on the next program chain.\n", __FUNCTION__ );
    3.72  		goto error;
    3.73  	}
    3.74  	
    3.75 @@ -712,7 +712,7 @@
    3.76  	return res;
    3.77  
    3.78  error:
    3.79 -	g_print( "[%s] ERROR running LiveTV setup.\n", __FUNCTION__ );
    3.80 +	gmyth_debug( "[%s] ERROR running LiveTV setup.\n", __FUNCTION__ );
    3.81  
    3.82      res = FALSE;
    3.83      
     4.1 --- a/gmyth/src/gmyth_monitor_handler.c	Tue Mar 27 23:57:42 2007 +0100
     4.2 +++ b/gmyth/src/gmyth_monitor_handler.c	Wed Mar 28 15:53:29 2007 +0100
     4.3 @@ -307,7 +307,7 @@
     4.4            ret = FALSE;
     4.5        }
     4.6        else {
     4.7 -          g_warning("Remote monitor event socket already created.\n");
     4.8 +          gmyth_debug("Remote monitor event socket already created.\n");
     4.9        }
    4.10    }
    4.11  
     5.1 --- a/gmyth/src/gmyth_recorder.c	Tue Mar 27 23:57:42 2007 +0100
     5.2 +++ b/gmyth/src/gmyth_recorder.c	Wed Mar 28 15:53:29 2007 +0100
     5.3 @@ -916,7 +916,7 @@
     5.4      }
     5.5  
     5.6  #ifndef GMYTHTV_ENABLE_DEBUG
     5.7 -    g_print( "[%s] Got file position = %lld\n", __FUNCTION__, pos);
     5.8 +    gmyth_debug( "[%s] Got file position = %lld\n", __FUNCTION__, pos);
     5.9  #endif
    5.10      
    5.11      g_mutex_unlock( recorder->mutex );
    5.12 @@ -1089,7 +1089,7 @@
    5.13   * @return <code>true</code>, if the tuner had been freed.
    5.14   */
    5.15  gboolean
    5.16 -gmyth_recorder_free_tuner( GMythRecorder *recorder) {
    5.17 +gmyth_recorder_free_tuner( GMythRecorder *recorder ) {
    5.18      gboolean ret = TRUE;
    5.19  
    5.20      g_return_val_if_fail( recorder != NULL, FALSE );
     6.1 --- a/gmyth/src/gmyth_stringlist.c	Tue Mar 27 23:57:42 2007 +0100
     6.2 +++ b/gmyth/src/gmyth_stringlist.c	Wed Mar 28 15:53:29 2007 +0100
     6.3 @@ -345,7 +345,7 @@
     6.4      GString *ret;
     6.5  
     6.6      if (!strlist || !(strlist->glist)) {
     6.7 -	g_warning ("%s received Null arguments", __FUNCTION__);
     6.8 +	gmyth_debug ("%s received Null arguments", __FUNCTION__);
     6.9  	return NULL;
    6.10      }
    6.11  
     7.1 --- a/gmyth/src/gmyth_tvchain.c	Tue Mar 27 23:57:42 2007 +0100
     7.2 +++ b/gmyth/src/gmyth_tvchain.c	Wed Mar 28 15:53:29 2007 +0100
     7.3 @@ -162,7 +162,7 @@
     7.4  	    g_free(isodate);	    
     7.5  	    g_free( cur_time );
     7.6      } else {
     7.7 -    	g_warning ("[%s] TVchain already initialized", __FUNCTION__);
     7.8 +    	gmyth_debug ("[%s] TVchain already initialized", __FUNCTION__);
     7.9      }
    7.10  
    7.11      return TRUE;
    7.12 @@ -210,7 +210,7 @@
    7.13  	/* TODO: Reuse gmyth_query already connected from context */
    7.14  	gmyth_query = gmyth_query_new ();
    7.15  	if (!gmyth_query_connect (gmyth_query, tvchain->backend_info)) {
    7.16 -		g_warning ("[%s] Could not connect to db", __FUNCTION__);
    7.17 +		gmyth_debug ("[%s] Could not connect to db", __FUNCTION__);
    7.18  		g_mutex_unlock( tvchain->mutex );
    7.19  		ret = FALSE;
    7.20  		goto done;
    7.21 @@ -239,7 +239,7 @@
    7.22  			entry->inputname = g_string_new (msql_row[8]);
    7.23  
    7.24  			//m_maxpos = query.value(4).toInt() + 1;
    7.25 -			g_print( "[%s] Reading TV chain entry (channel %s): [%s, %s, %s]\n", __FUNCTION__, entry->channum->str, entry->chanid->str, 
    7.26 +			gmyth_debug( "[%s] Reading TV chain entry (channel %s): [%s, %s, %s]\n", __FUNCTION__, entry->channum->str, entry->chanid->str, 
    7.27  					(gchar*)msql_row[1], (gchar*)msql_row[2] );
    7.28  			
    7.29  			/* add this to get the actual start timestamp of the last recording */
    7.30 @@ -249,7 +249,7 @@
    7.31  			tvchain->tvchain_list = g_list_append (tvchain->tvchain_list, entry);			
    7.32  		}
    7.33  	} else {
    7.34 -		g_warning ("gmyth_tvchain_reload_all query error!\n");
    7.35 +		gmyth_debug ("gmyth_tvchain_reload_all query error!\n");
    7.36  		g_mutex_unlock( tvchain->mutex );
    7.37  
    7.38  		ret = FALSE;
    7.39 @@ -259,7 +259,7 @@
    7.40  	g_mutex_unlock( tvchain->mutex );
    7.41  	
    7.42  	tvchain->cur_pos = gmyth_tvchain_program_is_at (tvchain, tvchain->cur_chanid, tvchain->cur_startts);
    7.43 -	g_print( "[%s] TVChain current position = %d.\n", __FUNCTION__, tvchain->cur_pos );
    7.44 +	gmyth_debug( "[%s] TVChain current position = %d.\n", __FUNCTION__, tvchain->cur_pos );
    7.45  
    7.46  	if (tvchain->cur_pos < 0)
    7.47  		tvchain->cur_pos = 0;
    7.48 @@ -362,7 +362,7 @@
    7.49  		gmyth_debug ("[%s] Got TV Chain entry at %d.\n", __FUNCTION__, new_index );
    7.50  
    7.51  	} else {
    7.52 -		g_warning ("[%s] failed to get entry at index %d", __FUNCTION__, index);
    7.53 +		gmyth_debug ("[%s] failed to get entry at index %d", __FUNCTION__, index);
    7.54  	}
    7.55  
    7.56  	return chain_entry;
    7.57 @@ -382,7 +382,7 @@
    7.58  	g_return_val_if_fail( tvchain != NULL, NULL );
    7.59  
    7.60  	if ( !entry || !tvchain ) {
    7.61 -		g_warning ("gmyth_tvchain_entry_to_program() received NULL argument");
    7.62 +		gmyth_debug ("gmyth_tvchain_entry_to_program() received NULL argument");
    7.63  		return NULL;
    7.64  	}
    7.65  
    7.66 @@ -396,7 +396,7 @@
    7.67  	if (proginfo) {
    7.68  		proginfo->pathname = g_string_prepend (proginfo->pathname, entry->hostprefix->str);
    7.69  	} else {
    7.70 -		g_warning ("tvchain_entry_to_program( chan id = %s, starttime = %ld) failed!", entry->chanid->str, entry->starttime->tv_sec);
    7.71 +		gmyth_debug ("tvchain_entry_to_program( chan id = %s, starttime = %ld) failed!", entry->chanid->str, entry->starttime->tv_sec);
    7.72  	}
    7.73  
    7.74  	return proginfo;