[Spread-users] Bug in Perl API
richard at tartarus.org
Thu Sep 18 12:04:46 EDT 2003
I've been evaluating spread over the last couple of days. I've been
using the Perl API, and have been confused by my program failing to
receive messages, apparently at random.
I've tracked this down to an uninitialised variable in the perl XS code
- here follows a patch, which fixes the dropped messages for me.
Without this patch, the stype passed to SP_receive is undefined, so may
contain a value which causes the message to be dropped.
--- Spread.xs.old 2003-09-18 16:54:17.000000000 +0100
+++ Spread.xs 2003-09-18 16:53:13.000000000 +0100
@@ -660,7 +660,7 @@
static int oldmsize=0, newmsize=(1<<15); /* 65k */
int i, mbox, endmis, ret, ngrps, msize;
- service stype;
+ service stype=0;
struct timeval towait;
static char *groups=NULL;
static char *mess=NULL;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 252 bytes
Desc: not available
Url : http://lists.spread.org/pipermail/spread-users/attachments/20030918/c0c56956/attachment.bin
More information about the Spread-users