commit 41069e92b3386845287e69307187d38f92213c3a
parent b5a12f253985ba423e715f621bb5e5887409a3af
Author: Christian Grothoff <christian@grothoff.org>
Date: Sat, 4 Aug 2012 18:57:24 +0000
check for IPC init error
Diffstat:
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/main/extractor.c b/src/main/extractor.c
@@ -375,7 +375,7 @@ do_extract (struct EXTRACTOR_PluginList *plugins,
int64_t min_seek;
int64_t end;
ssize_t data_available;
- uint32_t ready;
+ ssize_t ready;
int done;
plugin_count = 0;
@@ -394,7 +394,7 @@ do_extract (struct EXTRACTOR_PluginList *plugins,
start.opcode = MESSAGE_EXTRACT_START;
start.reserved = 0;
start.reserved2 = 0;
- start.shm_ready_bytes = ready;
+ start.shm_ready_bytes = (uint32_t) ready;
start.file_size = EXTRACTOR_datasource_get_size_ (ds, 0);
for (pos = plugins; NULL != pos; pos = pos->next)
{
@@ -408,7 +408,13 @@ do_extract (struct EXTRACTOR_PluginList *plugins,
pos->channel = NULL;
}
}
- done = 0;
+ if (-1 == ready)
+ {
+ LOG ("Failed to initialize IPC shared memory, cannot extract\n");
+ done = 1;
+ }
+ else
+ done = 0;
while (! done)
{
struct EXTRACTOR_Channel *channels[plugin_count];