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.c30
1 files changed, 1 insertions, 29 deletions
diff --git a/src/main/extractor_plugin_main.c b/src/main/extractor_plugin_main.c
index 4f6c77c..c56dfab 100644
--- a/src/main/extractor_plugin_main.c
+++ b/src/main/extractor_plugin_main.c
@@ -460,7 +460,6 @@ handle_start_message (struct ProcessingContext *pc)
460 LOG ("Failed to read 'start' message\n"); 460 LOG ("Failed to read 'start' message\n");
461 return -1; 461 return -1;
462 } 462 }
463 fprintf (stderr, "Got start msg\n");
464 pc->shm_ready_bytes = start.shm_ready_bytes; 463 pc->shm_ready_bytes = start.shm_ready_bytes;
465 pc->file_size = start.file_size; 464 pc->file_size = start.file_size;
466 pc->read_position = 0; 465 pc->read_position = 0;
@@ -476,10 +475,6 @@ handle_start_message (struct ProcessingContext *pc)
476 if (-1 == EXTRACTOR_write_all_ (pc->out, &done, sizeof (done))) 475 if (-1 == EXTRACTOR_write_all_ (pc->out, &done, sizeof (done)))
477 { 476 {
478 LOG ("Failed to write 'done' message\n"); 477 LOG ("Failed to write 'done' message\n");
479 FILE *f;
480 f = fopen("debug.txt", "a+");
481 fprintf(f, "Failed to write 'done' message' \n");
482 fclose(f);
483 return -1; 478 return -1;
484 } 479 }
485 if ( (NULL != pc->plugin->specials) && 480 if ( (NULL != pc->plugin->specials) &&
@@ -529,33 +524,18 @@ process_requests (struct ProcessingContext *pc)
529 if (0 != handle_start_message (pc)) 524 if (0 != handle_start_message (pc))
530 { 525 {
531 LOG ("Failure to handle START\n"); 526 LOG ("Failure to handle START\n");
532 FILE *f;
533 f = fopen("debug.txt", "a+");
534 fprintf(f, "Failure to handle START' \n");
535 fclose(f);
536 return; 527 return;
537 } 528 }
538 break; 529 break;
539 case MESSAGE_UPDATED_SHM:{ 530 case MESSAGE_UPDATED_SHM:
540 LOG ("Illegal message\n"); 531 LOG ("Illegal message\n");
541 /* not allowed here, we're not waiting for SHM to move! */ 532 /* not allowed here, we're not waiting for SHM to move! */
542 FILE *f;
543 f = fopen("debug.txt", "a+");
544 fprintf(f, "Illegal message' \n");
545 fclose(f);
546
547 return; 533 return;
548 }
549 case MESSAGE_DISCARD_STATE: 534 case MESSAGE_DISCARD_STATE:
550 /* odd, we're already in the start state... */ 535 /* odd, we're already in the start state... */
551 continue; 536 continue;
552 default: 537 default:
553 LOG ("Received invalid messag %d\n", (int) code); 538 LOG ("Received invalid messag %d\n", (int) code);
554 FILE *f;
555 f = fopen("debug.txt", "a+");
556 fprintf(f, "Received invalid messag' \n");
557 fclose(f);
558
559 /* error, unexpected message */ 539 /* error, unexpected message */
560 return; 540 return;
561 } 541 }
@@ -645,14 +625,6 @@ EXTRACTOR_plugin_main_ (struct EXTRACTOR_PluginList *plugin,
645 process_requests (&pc); 625 process_requests (&pc);
646 LOG ("IPC error; plugin `%s' terminates!\n", 626 LOG ("IPC error; plugin `%s' terminates!\n",
647 plugin->short_libname); 627 plugin->short_libname);
648
649
650 FILE *f;
651 f = fopen("debug.txt", "a+");
652 fprintf(f, "IPC error; plugin `%s' terminates!\n",
653 plugin->short_libname);
654 fclose(f);
655
656#if WINDOWS 628#if WINDOWS
657 if (NULL != pc.shm) 629 if (NULL != pc.shm)
658 UnmapViewOfFile (pc.shm); 630 UnmapViewOfFile (pc.shm);