[Spread-users] Bug in Perl API

Daniel L. Rall dlr at finemaltcoding.com
Sun Oct 5 19:03:54 EDT 2003


I've reviewed this change and agree that it should be included.  +1

Richard Boulton wrote:
> 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;
>           int16 mtype;
> -         service stype;
> +         service stype=0;
>           struct timeval towait;
>           static char *groups=NULL;
>           static char *mess=NULL;






More information about the Spread-users mailing list