[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r23136 - Extractor/src/main
From: |
gnunet |
Subject: |
[GNUnet-SVN] r23136 - Extractor/src/main |
Date: |
Mon, 6 Aug 2012 13:37:51 +0200 |
Author: grothoff
Date: 2012-08-06 13:37:51 +0200 (Mon, 06 Aug 2012)
New Revision: 23136
Modified:
Extractor/src/main/extractor.c
Log:
do not re-use plugin_count as it is used for array size
Modified: Extractor/src/main/extractor.c
===================================================================
--- Extractor/src/main/extractor.c 2012-08-06 11:10:20 UTC (rev 23135)
+++ Extractor/src/main/extractor.c 2012-08-06 11:37:51 UTC (rev 23136)
@@ -366,6 +366,7 @@
EXTRACTOR_MetaDataProcessor proc, void *proc_cls)
{
unsigned int plugin_count;
+ unsigned int plugin_off;
struct EXTRACTOR_PluginList *pos;
struct StartMessage start;
struct EXTRACTOR_Channel *channel;
@@ -423,22 +424,21 @@
struct EXTRACTOR_Channel *channels[plugin_count];
/* calculate current 'channels' array */
- plugin_count = 0;
+ plugin_off = 0;
for (pos = plugins; NULL != pos; pos = pos->next)
{
if (-1 == pos->seek_request)
{
/* channel is not seeking, must be running or done */
- channels[plugin_count] = pos->channel;
+ channels[plugin_off] = pos->channel;
}
else
{
/* not running this round, seeking! */
- channels[plugin_count] = NULL;
+ channels[plugin_off] = NULL;
}
- plugin_count++;
+ plugin_off++;
}
-
/* give plugins chance to send us meta data, seek or finished messages */
if (-1 ==
EXTRACTOR_IPC_channel_recv_ (channels,
@@ -455,10 +455,10 @@
/* calculate minimum seek request (or set done=0 to continue here) */
done = 1;
min_seek = -1;
- plugin_count = 0;
+ plugin_off = 0;
for (pos = plugins; NULL != pos; pos = pos->next)
{
- if ( (NULL == channels[plugin_count]) &&
+ if ( (NULL == channels[plugin_off]) &&
(-1 == pos->seek_request) )
{
/* EXTRACTOR_IPC_channel_recv_ got a non-NULL channel (-1 ==
seek_request)
@@ -466,7 +466,7 @@
so we need to update the plugin accordingly */
pos->channel = NULL;
}
- plugin_count++;
+ plugin_off++;
if ( (1 == pos->round_finished) ||
(NULL == pos->channel) )
continue; /* inactive plugin */
@@ -569,7 +569,6 @@
LOG ("Failed to seek to 0 for in-memory plugins\n");
return;
}
-
for (pos = plugins; NULL != pos; pos = pos->next)
{
if (EXTRACTOR_OPTION_IN_PROCESS != pos->flags)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r23136 - Extractor/src/main,
gnunet <=