diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-08-04 18:53:17 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-08-04 18:53:17 +0000 |
commit | b5a12f253985ba423e715f621bb5e5887409a3af (patch) | |
tree | 10c041bdc110b7038e29e45783adbbf6cd004dcd /src/main | |
parent | e12208a39468358b451923b28bf1b10ff9a5157c (diff) | |
download | libextractor-b5a12f253985ba423e715f621bb5e5887409a3af.tar.gz libextractor-b5a12f253985ba423e715f621bb5e5887409a3af.zip |
-fixed
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/TODO | 3 | ||||
-rw-r--r-- | src/main/extractor.c | 4 | ||||
-rw-r--r-- | src/main/extractor_ipc_gnu.c | 1 |
3 files changed, 5 insertions, 3 deletions
diff --git a/src/main/TODO b/src/main/TODO index b897a54..16348a6 100644 --- a/src/main/TODO +++ b/src/main/TODO | |||
@@ -3,6 +3,3 @@ | |||
3 | 3 | ||
4 | * MAX_META_DATA buffer of 32 MB is a bit big as a non-growing default size; | 4 | * MAX_META_DATA buffer of 32 MB is a bit big as a non-growing default size; |
5 | also, valgrind reports it is leaked even though printf-debugging shows it is not (!?) | 5 | also, valgrind reports it is leaked even though printf-debugging shows it is not (!?) |
6 | |||
7 | * for some reason, if a plugin crashes or something goes wrong (i.e. with a seek), | ||
8 | the whole system hangs (not good...) | ||
diff --git a/src/main/extractor.c b/src/main/extractor.c index b30c249..6fc85b0 100644 --- a/src/main/extractor.c +++ b/src/main/extractor.c | |||
@@ -446,8 +446,12 @@ do_extract (struct EXTRACTOR_PluginList *plugins, | |||
446 | /* calculate minimum seek request (or set done=0 to continue here) */ | 446 | /* calculate minimum seek request (or set done=0 to continue here) */ |
447 | done = 1; | 447 | done = 1; |
448 | min_seek = -1; | 448 | min_seek = -1; |
449 | plugin_count = 0; | ||
449 | for (pos = plugins; NULL != pos; pos = pos->next) | 450 | for (pos = plugins; NULL != pos; pos = pos->next) |
450 | { | 451 | { |
452 | if (NULL == channels[plugin_count]) | ||
453 | pos->channel = NULL; | ||
454 | plugin_count++; | ||
451 | if ( (1 == pos->round_finished) || | 455 | if ( (1 == pos->round_finished) || |
452 | (NULL == pos->channel) ) | 456 | (NULL == pos->channel) ) |
453 | continue; /* inactive plugin */ | 457 | continue; /* inactive plugin */ |
diff --git a/src/main/extractor_ipc_gnu.c b/src/main/extractor_ipc_gnu.c index cae1fe6..69dc185 100644 --- a/src/main/extractor_ipc_gnu.c +++ b/src/main/extractor_ipc_gnu.c | |||
@@ -468,6 +468,7 @@ EXTRACTOR_IPC_channel_recv_ (struct EXTRACTOR_Channel **channels, | |||
468 | if ( (-1 == (iret = read (channel->cpipe_out, | 468 | if ( (-1 == (iret = read (channel->cpipe_out, |
469 | &channel->data[channel->size], | 469 | &channel->data[channel->size], |
470 | MAX_META_DATA - channel->size)) ) || | 470 | MAX_META_DATA - channel->size)) ) || |
471 | (0 == iret) || | ||
471 | (-1 == (ret = EXTRACTOR_IPC_process_reply_ (channel->plugin, | 472 | (-1 == (ret = EXTRACTOR_IPC_process_reply_ (channel->plugin, |
472 | channel->data, | 473 | channel->data, |
473 | channel->size + iret, | 474 | channel->size + iret, |