[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libextractor] 18/27: do not try to seek on SHM if we do no
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libextractor] 18/27: do not try to seek on SHM if we do not use SHM, even if (bad) plugin requests it |
Date: |
Sun, 15 Oct 2017 21:34:42 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository libextractor.
commit f675653eefe612dae726104914a2da451ea77077
Author: Christian Grothoff <address@hidden>
AuthorDate: Sun Oct 15 20:41:16 2017 +0200
do not try to seek on SHM if we do not use SHM, even if (bad) plugin
requests it
---
src/main/extractor.c | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/src/main/extractor.c b/src/main/extractor.c
index b51af84b..c35ebd8d 100644
--- a/src/main/extractor.c
+++ b/src/main/extractor.c
@@ -360,7 +360,7 @@ in_process_proc (void *cls,
* all plugins are in-process)
* @param ds data to process
* @param proc function to call for each meta data item found
- * @param proc_cls cls argument to proc
+ * @param proc_cls cls argument to @a proc
*/
static void
do_extract (struct EXTRACTOR_PluginList *plugins,
@@ -387,7 +387,10 @@ do_extract (struct EXTRACTOR_PluginList *plugins,
for (pos = plugins; NULL != pos; pos = pos->next)
plugin_count++;
if (NULL != shm)
- ready = EXTRACTOR_IPC_shared_memory_set_ (shm, ds, 0, DEFAULT_SHM_SIZE);
+ ready = EXTRACTOR_IPC_shared_memory_set_ (shm,
+ ds,
+ 0,
+ DEFAULT_SHM_SIZE);
else
ready = 0;
have_in_memory = 0;
@@ -500,7 +503,8 @@ do_extract (struct EXTRACTOR_PluginList *plugins,
}
data_available = -1;
if ( (1 == done) &&
- (-1 != min_seek) )
+ (-1 != min_seek) &&
+ (NULL != shm) )
{
/* current position done, but seek requested */
done = 0;
@@ -642,6 +646,7 @@ EXTRACTOR_extract (struct EXTRACTOR_PluginList *plugins,
}
for (pos = plugins; NULL != pos; pos = pos->next)
if ( (NULL == pos->channel) &&
+ (NULL != shm) &&
(EXTRACTOR_OPTION_IN_PROCESS != pos->flags) )
{
if (NULL == pos->shm)
@@ -652,7 +657,11 @@ EXTRACTOR_extract (struct EXTRACTOR_PluginList *plugins,
pos->channel = EXTRACTOR_IPC_channel_create_ (pos,
shm);
}
- do_extract (plugins, shm, datasource, proc, proc_cls);
+ do_extract (plugins,
+ shm,
+ datasource,
+ proc,
+ proc_cls);
EXTRACTOR_datasource_destroy_ (datasource);
}
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [libextractor] 03/27: avoid passing of char to isspace()-family of functions, always pass unsigned chars, (continued)
- [GNUnet-SVN] [libextractor] 03/27: avoid passing of char to isspace()-family of functions, always pass unsigned chars, gnunet, 2017/10/15
- [GNUnet-SVN] [libextractor] 09/27: fix very hypothetical lack of 0-termination in ole2-extractor iff translation string was more than 10x as long as the English version, gnunet, 2017/10/15
- [GNUnet-SVN] [libextractor] 16/27: handle allocation failure in gstreamer plugin, gnunet, 2017/10/15
- [GNUnet-SVN] [libextractor] 11/27: be more conservative about result from ctime_r, gnunet, 2017/10/15
- [GNUnet-SVN] [libextractor] 14/27: add missing continue if max meta data was reached to avoid use after free, gnunet, 2017/10/15
- [GNUnet-SVN] [libextractor] 15/27: fix indentation, gnunet, 2017/10/15
- [GNUnet-SVN] [libextractor] 06/27: fix duration initialization in ffmpeg extractor (badly positioned #if), gnunet, 2017/10/15
- [GNUnet-SVN] [libextractor] 13/27: seems some specs of c_time allow up to 71 bytes, so increase buffer size just to be safe, gnunet, 2017/10/15
- [GNUnet-SVN] [libextractor] 19/27: need isspace, not isblank for rpm extractor, gnunet, 2017/10/15
- [GNUnet-SVN] [libextractor] 17/27: handle allocation failure in PDF fdopen call, gnunet, 2017/10/15
- [GNUnet-SVN] [libextractor] 18/27: do not try to seek on SHM if we do not use SHM, even if (bad) plugin requests it,
gnunet <=
- [GNUnet-SVN] [libextractor] 10/27: be more careful with memory allocation failures in gsf extractor, avoid calling g_free(NULL), gnunet, 2017/10/15
- [GNUnet-SVN] [libextractor] 20/27: fix signed/unsigned comparison issue, gnunet, 2017/10/15
- [GNUnet-SVN] [libextractor] 21/27: handle IPC_shared_memory_set_ error, gnunet, 2017/10/15
- [GNUnet-SVN] [libextractor] 25/27: avoid NPE on empty value in grep-friendly printing, gnunet, 2017/10/15
- [GNUnet-SVN] [libextractor] 12/27: fix NPE in extract for 0-byte values, gnunet, 2017/10/15
- [GNUnet-SVN] [libextractor] 07/27: doxygen improvements, gnunet, 2017/10/15
- [GNUnet-SVN] [libextractor] 26/27: check return values from dup2(), gnunet, 2017/10/15
- [GNUnet-SVN] [libextractor] 22/27: remove useless assignment, gnunet, 2017/10/15
- [GNUnet-SVN] [libextractor] 24/27: avoid calling free(NULL) on plugin load error, gnunet, 2017/10/15
- [GNUnet-SVN] [libextractor] 27/27: update gitignore, gnunet, 2017/10/15