aboutsummaryrefslogtreecommitdiff
path: root/src/main/extractor_plugin_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/extractor_plugin_main.c')
-rw-r--r--src/main/extractor_plugin_main.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/src/main/extractor_plugin_main.c b/src/main/extractor_plugin_main.c
index f9eed28..10dcbac 100644
--- a/src/main/extractor_plugin_main.c
+++ b/src/main/extractor_plugin_main.c
@@ -318,8 +318,13 @@ plugin_env_send_proc (void *cls,
318 LOG ("Failed to read response to meta message\n"); 318 LOG ("Failed to read response to meta message\n");
319 return 1; 319 return 1;
320 } 320 }
321 if (MESSAGE_CONTINUE_EXTRACTING != reply) 321 if (MESSAGE_DISCARD_STATE == reply)
322 return 1; 322 return 1;
323 if (MESSAGE_CONTINUE_EXTRACTING != reply)
324 {
325 LOG ("Received unexpected reply to meta data: %d\n", reply);
326 return 1;
327 }
323 return 0; 328 return 0;
324} 329}
325 330
@@ -467,7 +472,7 @@ process_requests (struct ProcessingContext *pc)
467 while (1) 472 while (1)
468 { 473 {
469 unsigned char code; 474 unsigned char code;
470 475
471 if (1 != EXTRACTOR_read_all_ (pc->in, &code, 1)) 476 if (1 != EXTRACTOR_read_all_ (pc->in, &code, 1))
472 { 477 {
473 LOG ("Failed to read next request\n"); 478 LOG ("Failed to read next request\n");
@@ -477,12 +482,20 @@ process_requests (struct ProcessingContext *pc)
477 { 482 {
478 case MESSAGE_INIT_STATE: 483 case MESSAGE_INIT_STATE:
479 if (0 != handle_init_message (pc)) 484 if (0 != handle_init_message (pc))
480 return; 485 {
486 LOG ("Failure to handle INIT\n");
487 return;
488 }
481 break; 489 break;
482 case MESSAGE_EXTRACT_START: 490 case MESSAGE_EXTRACT_START:
483 if (0 != handle_start_message (pc)) 491 if (0 != handle_start_message (pc))
484 return; 492 {
493 LOG ("Failure to handle START\n");
494 return;
495 }
496 break;
485 case MESSAGE_UPDATED_SHM: 497 case MESSAGE_UPDATED_SHM:
498 LOG ("Illegal message\n");
486 /* not allowed here, we're not waiting for SHM to move! */ 499 /* not allowed here, we're not waiting for SHM to move! */
487 return; 500 return;
488 case MESSAGE_DISCARD_STATE: 501 case MESSAGE_DISCARD_STATE:
@@ -579,6 +592,8 @@ EXTRACTOR_plugin_main_ (struct EXTRACTOR_PluginList *plugin,
579 pc.shm = NULL; 592 pc.shm = NULL;
580 pc.shm_map_size = 0; 593 pc.shm_map_size = 0;
581 process_requests (&pc); 594 process_requests (&pc);
595 LOG ("IPC error; plugin `%s' terminates!\n",
596 plugin->short_libname);
582#if WINDOWS 597#if WINDOWS
583 if (NULL != pc.shm) 598 if (NULL != pc.shm)
584 UnmapViewOfFile (pc.shm); 599 UnmapViewOfFile (pc.shm);