Joe Atzberger [Mon, 24 May 2010 22:52:21 +0000 (22:52 +0000)]
Checksum computation overhaul
This adds advanced debugging of checksum computation.
Note: good sample data is lacking. I think most of the actual
checksum lines included in the test are questionable. The only
one that computes accurately seems to be the example from the
3M SIP Developers Guide that specifically addresses checksum
computation. The others from the same guide seem invalid!
I think the debugging output suggests the implementation is
consistent with the specified instructions, despite unavailability
of sample data to confirm.
Joe Atzberger [Tue, 11 May 2010 01:56:37 +0000 (01:56 +0000)]
Get rid of weird evals, useless use's
There are no scripts committed that use DATA handles, so those
eval blocks are not part of a known application. And that
behavior is super sketchy, especially with multiple scripts, likely
in combination!
djfiander [Wed, 13 Jan 2010 01:39:30 +0000 (01:39 +0000)]
Dan Scott's patch:
Item status response 18 was returning CJ0|CM0| which are invalid
according to the SIP2 specification; they should either be
18-char fixed fields or not there at all (as they're optional).
It looks like it was just a reversed test. In looking through
Sip/MsgType.pm in that area, I put together a patch which
prevents those fields from being generated if the incoming value
is 0 - and separates out the value assignment & test into
separate statements, which should make the code a bit easier to
read.
As an aside, I believe the same problem was preventing the due
date (AH) from being returned in the item status response.
Force the key to the 'listeners' hash to be all lowercase, and
force the key for which we search at runtime to be lowercase, so
that searches of the hash are case-insensitive.
Fix code so that it will run with Net::Server 0.96. This is just
eliminating a dependency on the internals of the Net::Server
object, so this code will continue to run with older versions of
Net::Server as well.
Apply Bill Erickson's patch to clean up matching an incoming
connection against the configuration file. There's no longer a
special case for 127.0.0.1, so it will not longer match
'localhost', but it doesn't match any other hostnames anyway.
Move code that connects to ILS back end out of
sip_protocol_loop() and into handle_login(). This way, if
there's a problem loading or initializing the ILS implementation,
the client will be told that login failed, rather than
"successfully" logging in and then having the server die later.
djfiander [Sat, 26 Aug 2006 18:50:42 +0000 (18:50 +0000)]
Go back to using unpack to generate the checksums, except that
I'm using the 'U'TF encoding instead of the 'C'har encoding.
This seems to work, at least in my test environment.
djfiander [Fri, 25 Aug 2006 01:21:37 +0000 (01:21 +0000)]
Replace idiomatic perl checksum code, which seems to fail on
strings with diacriticals in them, with an explicit sum of the
ordinal values of the characters in the string, which seems to cope.
Don't rely on clients sending the exactly protocol strings '1.00'
and '2.00'. Anything that starts with a '1.' is a "revision 1"
protocol string and anything that begins with a '2.' is a
"revision 2" protocol string. That way, when a clients reports
that they support protocol revision '2.0S', we will properly
react and send revision 2.00 messages.
Allow clients to violate the protocol specification by not
sending and SC Status message first after they log in. This
should work fine for SIP Login clients, but clients that use
telnet to log in MUST send an SC Status message, or they'll be
trapped using SIP rev 1.00.
djfiander [Thu, 29 Jun 2006 01:40:18 +0000 (01:40 +0000)]
Rewrite so that each message is a single test, which might fail
in one of several different ways, rather than counting all of the
various checks performed on each message as a separate test.
This reduces the number of "tests" counted from over 1000 to less
than 100, but the same number of things is being tested.
djfiander [Wed, 14 Jun 2006 02:16:16 +0000 (02:16 +0000)]
Define an empty array of fields to be checked in the responses
for those messages that don't require any field checking. This
eliminates "TODO" failures from the test harness.