Subject: | SMPP.pm : IO::Socket sockopt wrong syntax |
Hello,
The new_listen method use wrong syntax while calling to IO::Socket
sockopt method.
The correct syntax is sockopt(OPT [, VAL]).
Otherwise the following error is generated.
Please see the attached patch.
Thank you,
Leonid
Argument "SO_REUSEADDR" isn't numeric in setsockopt at
C:/Perl64/lib/IO/Socket.pm line 300 (#1)
(W numeric) The indicated string was fed as an argument to an
operator
that expected a numeric value instead. If you're fortunate the
message
will identify which operator was so unfortunate.
Perl version:
This is perl 5, version 14, subversion 1 (v5.14.1) built for MSWin32-
x64-multi-thread
Subject: | SMPP.patch |
--- SMPP.pm Sun Jul 31 00:56:50 2011
+++ SMPP_new.pm Sun Jul 31 00:57:13 2011
@@ -2284,7 +2284,7 @@
${*$s}{$a} = exists $arg{$a} ? $arg{$a} : Default->{$a};
}
$s->set_version(${*$s}{smpp_version});
- $s->sockopt(SO_REUSEADDR => 1);
+ $s->sockopt(SO_REUSEADDR,1);
$s->autoflush(1);
#$s->debug(exists $arg{debug} ? $arg{debug} : undef);
return $s;