Commit 1e94a934 authored by Carlos Garnacho's avatar Carlos Garnacho Committed by Carlos Garnacho

Merged together. (process_context_child_watch_cb): Removed obsolete code.

2009-03-11  Carlos Garnacho  <carlos@imendio.com>

        * src/tracker-indexer/tracker-module-metadata-utils.c
        (process_context_invalidate) (process_context_destroy): Merged
        together.
        (process_context_child_watch_cb): Removed obsolete code.
        (process_context_create): Set a 10 seconds timeout to extract text.
        Fixes #455588.

svn path=/trunk/; revision=3052
parent 2b4730f6
2009-03-11 Carlos Garnacho <carlos@imendio.com>
* src/tracker-indexer/tracker-module-metadata-utils.c
(process_context_invalidate) (process_context_destroy): Merged
together.
(process_context_child_watch_cb): Removed obsolete code.
(process_context_create): Set a 10 seconds timeout to extract text.
Fixes #455588.
2009-03-11 Martyn Russell <martyn@imendio.com>
* tests/libtracker-db/tracker-index-writer-test.c: Code clean ups.
......
......@@ -49,6 +49,8 @@
#define TEXT_MAX_SIZE 1048576 /* bytes */
#define TEXT_CHECK_SIZE 65535 /* bytes */
#define TEXT_EXTRACTION_TIMEOUT 10
typedef struct {
GPid pid;
guint stdout_watch_id;
......@@ -58,8 +60,6 @@ typedef struct {
gpointer data;
} ProcessContext;
static ProcessContext *metadata_context = NULL;
static DBusGProxy *
get_dbus_extract_proxy (void)
{
......@@ -95,7 +95,7 @@ get_dbus_extract_proxy (void)
}
static void
process_context_invalidate (ProcessContext *context)
process_context_destroy (ProcessContext *context)
{
if (context->stdin_channel) {
g_io_channel_shutdown (context->stdin_channel, FALSE, NULL);
......@@ -127,12 +127,7 @@ process_context_invalidate (ProcessContext *context)
g_spawn_close_pid (context->pid);
context->pid = 0;
}
}
static void
process_context_destroy (ProcessContext *context)
{
process_context_invalidate (context);
g_free (context);
}
......@@ -148,11 +143,6 @@ process_context_child_watch_cb (GPid pid,
status);
context = (ProcessContext *) user_data;
if (context == metadata_context) {
metadata_context = NULL;
}
process_context_destroy (context);
}
......@@ -166,7 +156,7 @@ process_context_create (const gchar **argv,
GPid pid;
if (!tracker_spawn_async_with_channels (argv,
0,
TEXT_EXTRACTION_TIMEOUT,
&pid,
&stdin_channel,
&stdout_channel,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment