libextractor

GNU libextractor
Log | Files | Refs | Submodules | README | LICENSE

commit b5a12f253985ba423e715f621bb5e5887409a3af
parent e12208a39468358b451923b28bf1b10ff9a5157c
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sat,  4 Aug 2012 18:53:17 +0000

-fixed

Diffstat:
Msrc/main/TODO | 3---
Msrc/main/extractor.c | 4++++
Msrc/main/extractor_ipc_gnu.c | 1+
3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/main/TODO b/src/main/TODO @@ -3,6 +3,3 @@ * MAX_META_DATA buffer of 32 MB is a bit big as a non-growing default size; also, valgrind reports it is leaked even though printf-debugging shows it is not (!?) - -* for some reason, if a plugin crashes or something goes wrong (i.e. with a seek), - the whole system hangs (not good...) diff --git a/src/main/extractor.c b/src/main/extractor.c @@ -446,8 +446,12 @@ do_extract (struct EXTRACTOR_PluginList *plugins, /* calculate minimum seek request (or set done=0 to continue here) */ done = 1; min_seek = -1; + plugin_count = 0; for (pos = plugins; NULL != pos; pos = pos->next) { + if (NULL == channels[plugin_count]) + pos->channel = NULL; + plugin_count++; if ( (1 == pos->round_finished) || (NULL == pos->channel) ) continue; /* inactive plugin */ diff --git 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, if ( (-1 == (iret = read (channel->cpipe_out, &channel->data[channel->size], MAX_META_DATA - channel->size)) ) || + (0 == iret) || (-1 == (ret = EXTRACTOR_IPC_process_reply_ (channel->plugin, channel->data, channel->size + iret,