jesus 05/09/11 20:58:52
Modified: perl/Spread README Spread.pm Spread.xs
Log:
Update to the latest version available in CPAN.
Fixes:
o MAN page
o EXPORTS of SP_disconnect
o error conditions returned from the timed receive to differentiate
between timeout and error conditions.
Revision Changes Path
1.6 +11 -4 spread/perl/Spread/README
Index: README
===================================================================
RCS file: /storage/cvsroot/spread/perl/Spread/README,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- README 10 Sep 2001 17:25:48 -0000 1.5
+++ README 12 Sep 2005 00:58:51 -0000 1.6
@@ -1,11 +1,11 @@
-Spread-3.15.2 Version 1.04
+Spread-3.17.3 Version 1.07
=====================
DESCRIPTION
-----------
-Spread-3.15.2-1.04 is a Perl module that conveniently wraps the Spread C
-libraries provided with the Spread 3.15.2 distribution. Spread is available at
+Spread-3.17.3-1.07 is a Perl module that conveniently wraps the Spread C
+libraries provided with the Spread 3.17.3 distribution. Spread is available at
http://www.spread.org/. Spread is a local/wide area group communication
toolkit that runs on most modern operating systems. It allows convenient
mechanisms for reliable multicasting information between applications as well
@@ -14,6 +14,13 @@
CHANGES
-------
+Version 3.17.3-1.07 fix man pages and exports.
+
+Version 3.17.3-1.06 differentiate between select timeout and other failures.
+Thanks to Matt Sergeant.
+
+Version 3.17.1-1.05 fixes a service_type error (uninitialized variable)
+
Version 3.15.2-1.04 adds a MANFIEST, dist to Makefile.PL, and several spelling
corrections. The only used code change was the spelling correction of CAUSAL.
@@ -46,7 +53,7 @@
COPYRIGHT AND DISCLAIMER
------------------------
-Copyright (c) 2000,2001 Theo Schlossnagle <[email protected]>
+Copyright (c) 2000-2005 Theo Schlossnagle <[email protected]>
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
1.7 +6 -7 spread/perl/Spread/Spread.pm
Index: Spread.pm
===================================================================
RCS file: /storage/cvsroot/spread/perl/Spread/Spread.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Spread.pm 26 Sep 2002 13:54:46 -0000 1.6
+++ Spread.pm 12 Sep 2005 00:58:51 -0000 1.7
@@ -1,9 +1,8 @@
# Filename: Spread.pm
# Author: Theo Schlossnagle <[email protected]>
# Created: 12th October 1999
-# Version: 1.03152
#
-# Copyright (c) 1999-2001 Theo Schlossnagle. All rights reserved.
+# Copyright (c) 1999-2003 Theo Schlossnagle. All rights reserved.
# This program is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.
#
@@ -20,7 +19,7 @@
use strict;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $AUTOLOAD);
-$VERSION = "3.17.0-1.04" ;
+$VERSION = "3.17.3-1.07" ;
*SP_connect = \&Spread::connect;
*SP_disconnect = \&Spread::disconnect;
@@ -71,7 +70,7 @@
REJECT_QUOTA
REJECT_VERSION) ],
SP => [ qw(SP_connect
- SP_disconnecct
+ SP_disconnect
SP_join
SP_leave
SP_receive
@@ -120,7 +119,7 @@
REJECT_VERSION
SP_connect
- SP_disconnecct
+ SP_disconnect
SP_join
SP_leave
SP_receive
@@ -176,10 +175,10 @@
use Spread;
# Connect
- my($mailbox, $private_group) = Spread::connect(
+ my($mbox, $private_group) = Spread::connect( {
spread_name => '[email protected]',
private_name => 'mrcool',
- );
+ } );
# Join and leave groups
my(@group_to_join) = ( 'GroupA', 'GroupB', 'GroupC' );
1.6 +7 -5 spread/perl/Spread/Spread.xs
Index: Spread.xs
===================================================================
RCS file: /storage/cvsroot/spread/perl/Spread/Spread.xs,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Spread.xs 26 Sep 2002 13:53:38 -0000 1.5
+++ Spread.xs 12 Sep 2005 00:58:51 -0000 1.6
@@ -1,9 +1,8 @@
/* Filename: Spread.xs
* Author: Theo Schlossnagle <[email protected]>
* Created: 12th October 1999
- * Version: 1.03152
*
- * Copyright (c) 1999-2001 Theo Schlossnagle. All rights reserved.
+ * Copyright (c) 1999-2003 Theo Schlossnagle. All rights reserved.
* This program is free software; you can redistribute it and/or
* modify it under the same terms as Perl itself.
*
@@ -37,9 +36,12 @@
#define SPERRNO "Spread::sperrno"
+#define MAX_ERRMSG 4
+#define SELECT_FAILED 4
#define SELECT_TIMEOUT 3
#define ARGS_INSUFF 2
static char *my_e_errmsg[] = {
+ "Select Failed", /* SELECT_FAILED 4 */
"Select Timed Out", /* SELECT_TIMEOUT 3 */
"Insufficient Arguments", /* ARGS_INSUFF 2 */
"Accept Session", /* ACCEPT_SESSION 1 */
@@ -429,7 +431,7 @@
char * errstr ;
SV * sperror_sv = perl_get_sv(SPERRNO, FALSE);
- errstr = (char *) my_e_errmsg[3 - error_no];
+ errstr = (char *) my_e_errmsg[MAX_ERRMSG - error_no];
if (SvIV(sperror_sv) != error_no) {
sv_setiv(sperror_sv, error_no) ;
sv_setpv(sperror_sv, errstr) ;
@@ -660,7 +662,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;
@@ -687,7 +689,7 @@
FD_ZERO(&readfs); FD_SET(mbox, &readfs);
if((ret = select(mbox+1, &readfs, NULL, &readfs, &towait))!=1) {
STYPE=SENDER=MTYPE=ENDMIS=MESSAGE=&PL_sv_undef;
- SetSpErrorNo(SELECT_TIMEOUT);
+ SetSpErrorNo( ret == 0 ? SELECT_TIMEOUT : SELECT_FAILED );
goto rec_ending;
}
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.