aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-08-04 18:57:24 +0000
committerChristian Grothoff <christian@grothoff.org>2012-08-04 18:57:24 +0000
commit41069e92b3386845287e69307187d38f92213c3a (patch)
tree3b115af642471a4763db5e2814df64fe06184034 /src/main
parentb5a12f253985ba423e715f621bb5e5887409a3af (diff)
downloadlibextractor-41069e92b3386845287e69307187d38f92213c3a.tar.gz
libextractor-41069e92b3386845287e69307187d38f92213c3a.zip
check for IPC init error
Diffstat (limited to 'src/main')
-rw-r--r--src/main/extractor.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/main/extractor.c b/src/main/extractor.c
index 6fc85b0..5bc2b6e 100644
--- a/src/main/extractor.c
+++ b/src/main/extractor.c
@@ -375,7 +375,7 @@ do_extract (struct EXTRACTOR_PluginList *plugins,
375 int64_t min_seek; 375 int64_t min_seek;
376 int64_t end; 376 int64_t end;
377 ssize_t data_available; 377 ssize_t data_available;
378 uint32_t ready; 378 ssize_t ready;
379 int done; 379 int done;
380 380
381 plugin_count = 0; 381 plugin_count = 0;
@@ -394,7 +394,7 @@ do_extract (struct EXTRACTOR_PluginList *plugins,
394 start.opcode = MESSAGE_EXTRACT_START; 394 start.opcode = MESSAGE_EXTRACT_START;
395 start.reserved = 0; 395 start.reserved = 0;
396 start.reserved2 = 0; 396 start.reserved2 = 0;
397 start.shm_ready_bytes = ready; 397 start.shm_ready_bytes = (uint32_t) ready;
398 start.file_size = EXTRACTOR_datasource_get_size_ (ds, 0); 398 start.file_size = EXTRACTOR_datasource_get_size_ (ds, 0);
399 for (pos = plugins; NULL != pos; pos = pos->next) 399 for (pos = plugins; NULL != pos; pos = pos->next)
400 { 400 {
@@ -408,7 +408,13 @@ do_extract (struct EXTRACTOR_PluginList *plugins,
408 pos->channel = NULL; 408 pos->channel = NULL;
409 } 409 }
410 } 410 }
411 done = 0; 411 if (-1 == ready)
412 {
413 LOG ("Failed to initialize IPC shared memory, cannot extract\n");
414 done = 1;
415 }
416 else
417 done = 0;
412 while (! done) 418 while (! done)
413 { 419 {
414 struct EXTRACTOR_Channel *channels[plugin_count]; 420 struct EXTRACTOR_Channel *channels[plugin_count];