[svn r404] Some fixes on the MythTV backend messages from LiveTV.
1.1 --- a/gmyth/src/gmyth_http.c Wed Mar 07 16:50:11 2007 +0000
1.2 +++ b/gmyth/src/gmyth_http.c Wed Mar 07 22:15:15 2007 +0000
1.3 @@ -253,9 +253,9 @@
1.4 endtime = gmyth_util_time_to_mythformat_from_time_val(EndTime);
1.5
1.6 GString* command = g_string_new("");
1.7 - g_string_printf(command, "getProgramGuide?StartTime=%s&EndTime=%s&StartChanId=%d"
1.8 + g_string_printf(command, "getProgramGuide?StartTime=%s&EndTime=%s&StartChanId=%d" \
1.9 "&NumOfChannels=%d&Details=%s", starttime, endtime, \
1.10 - StartChanId, NumOfChannels, Details);
1.11 + StartChanId, NumOfChannels, Details );
1.12
1.13 chunk = gmyth_http_request(backend_info, command);
1.14 if (chunk.memory != NULL)
2.1 --- a/gmyth/src/gmyth_livetv.c Wed Mar 07 16:50:11 2007 +0000
2.2 +++ b/gmyth/src/gmyth_livetv.c Wed Mar 07 22:15:15 2007 +0000
2.3 @@ -199,6 +199,7 @@
2.4 } else
2.5 gmyth_debug( "LIVETV file_transfer is NULL!!! Cannot move to the next program chain event received.\n");
2.6 }
2.7 + break;
2.8 }
2.9 case GMYTH_BACKEND_DONE_RECORDING:
2.10 {
2.11 @@ -224,6 +225,7 @@
2.12 } else
2.13 gmyth_debug( "LIVETV file_transfer is NULL!!! Cannot move to the next program chain event received.\n");
2.14 }
2.15 + break;
2.16 }
2.17 case GMYTH_BACKEND_STOP_LIVETV:
2.18 {
2.19 @@ -399,7 +401,7 @@
2.20
2.21 while (wait_to_transfer++ < GMYTHTV_TRANSFER_MAX_WAITS &&
2.22 (gmyth_recorder_is_recording (livetv->recorder) == FALSE))
2.23 - g_usleep (800);
2.24 + g_usleep (300);
2.25
2.26 if ( channel != NULL )
2.27 {
2.28 @@ -421,7 +423,7 @@
2.29
2.30 } /* if - changes the channel number */
2.31
2.32 - sleep (2); /* FIXME: this is evil (tpm) */
2.33 + sleep (6); /* FIXME: this is evil (tpm) */
2.34 }
2.35
2.36 /* DEBUG message */
2.37 @@ -703,7 +705,7 @@
2.38 goto done;
2.39 }
2.40
2.41 - gmyth_file_transfer_settimeout( livetv->file_transfer, TRUE );
2.42 + //gmyth_file_transfer_settimeout( livetv->file_transfer, TRUE );
2.43
2.44 g_mutex_unlock( livetv->mutex );
2.45
3.1 --- a/gmyth/src/gmyth_util.c Wed Mar 07 16:50:11 2007 +0000
3.2 +++ b/gmyth/src/gmyth_util.c Wed Mar 07 22:15:15 2007 +0000
3.3 @@ -104,14 +104,15 @@
3.4 {
3.5 gchar *result = NULL;
3.6 struct tm *tm_time = NULL;
3.7 + time_t time;
3.8
3.9 gint buffer_len = 0;
3.10
3.11 g_return_val_if_fail( fmt_string != NULL, NULL );
3.12
3.13 g_return_val_if_fail( time_val != NULL, NULL );
3.14 -
3.15 - time_t time = time_val->tv_sec;// + (gint)( time_val->tv_usec / G_USEC_PER_SEC );
3.16 +
3.17 + time = time_val->tv_sec;// + (gint)( time_val->tv_usec / G_USEC_PER_SEC );
3.18
3.19 tm_time = g_malloc0( sizeof(struct tm) );
3.20
3.21 @@ -120,7 +121,8 @@
3.22 if ( NULL == localtime_r( &time, tm_time ) ) {
3.23 g_warning ("gmyth_util_time_to_isoformat convertion error!\n");
3.24 } else {
3.25 - // we first check the return of strftime to allocate a buffer of the correct size
3.26 +
3.27 + /* we first check the return of strftime to allocate a buffer of the correct size */
3.28 buffer_len = strftime( NULL, SSIZE_MAX, fmt_string, tm_time );
3.29 if ( buffer_len > 0 ) {
3.30 result = g_malloc0( buffer_len + 1 );
3.31 @@ -133,7 +135,7 @@
3.32 gmyth_debug( "Dateline (ISO result): %s", result );
3.33 }
3.34
3.35 - }
3.36 + } /* if */
3.37
3.38 gmyth_debug( "Result (strftime) = %s", result );
3.39