# HG changeset patch # User morphbr # Date 1174576295 0 # Node ID 0b3aa34f340a0b6d15d78a8bc64ea1e4dcc0343a # Parent 9638cccfa1fe257b2cb179ba9eb4a43ccbb2ba04 [svn r431] - gmyth_jobqueue bug fixes diff -r 9638cccfa1fe -r 0b3aa34f340a gmyth/src/gmyth_jobqueue.c --- a/gmyth/src/gmyth_jobqueue.c Wed Mar 21 21:35:20 2007 +0000 +++ b/gmyth/src/gmyth_jobqueue.c Thu Mar 22 15:11:35 2007 +0000 @@ -82,18 +82,16 @@ gmyth_string_list_append_string (retlist, command); gmyth_socket_write_stringlist (socket, retlist); - g_string_free(command, TRUE); - // receive answer gmyth_socket_read_stringlist (socket, retlist); ret_str = gmyth_string_list_get_string(retlist, 0); - ret = ret_str->str; - g_string_free( ret_str, FALSE); + //ret = ret_str->str; + ret = g_string_free( ret_str, FALSE); g_string_free (command, TRUE); - + gmyth_string_list_clear_all (retlist); - g_object_unref (retlist); + g_object_unref (retlist); return ret; } @@ -131,7 +129,7 @@ if (socket != NULL) { GString* options = g_string_new (""); gchar* ret; - + if (g_ascii_strcasecmp(job, "JOB_TRANSCODE") == 0) { if (transcode->cutlist) @@ -150,8 +148,12 @@ gmyth_socket_close_connection (socket); g_object_unref (socket); + g_string_free (options, TRUE); - g_free (ret); + + if (ret) + g_free (ret); + } else { g_debug("JobQueue Connection Failed"); } @@ -174,20 +176,20 @@ gboolean res; if (socket != NULL) { - GString* ret = send_command(socket, action, job, - transcode->chanid, - transcode->starttime, ""); + gchar* ret = send_command(socket, action, job, + transcode->chanid, + transcode->starttime, ""); - res = test_result(ret->str, "JOBQUEUE_CHANGED_CMD_OK"); + res = test_result(ret, "JOBQUEUE_CHANGED_CMD_OK"); gmyth_socket_close_connection (socket); g_object_unref (socket); - g_string_free(ret, TRUE); + g_free(ret); } else { g_debug("JobQueue Connection Failed"); } - + return res; } diff -r 9638cccfa1fe -r 0b3aa34f340a gmyth/tests/gmyth_test_transcode.c --- a/gmyth/tests/gmyth_test_transcode.c Wed Mar 21 21:35:20 2007 +0000 +++ b/gmyth/tests/gmyth_test_transcode.c Thu Mar 22 15:11:35 2007 +0000 @@ -23,9 +23,9 @@ transcode->backend_info = backend_info; transcode->cutlist = TRUE; - gmyth_transcoder_set_output (transcode, TRUE, "/tmp/teste.mp4"); - gmyth_transcoder_set_filename (transcode, "1000_20061207123000.nuv"); - //gmyth_transcoder_set_filename (transcode, "1000_20061213130000.nuv"); + //gmyth_transcoder_set_output (transcode, TRUE, "/tmp/teste.mp4"); + gmyth_transcoder_set_filename (transcode, "1000_20070309160500.nuv"); + //gmyth_transcoder_set_filename (transcode, "1000_20070319170000.nuv"); int teste = gmyth_jobqueue_add_job(transcode, "JOB_TRANSCODE"); teste = gmyth_jobqueue_change_cmd(transcode, "STOP", "JOB_TRANSCODE");