projects
/
working
/
SIPServer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
08b650f
)
Pack, then unpack total in debug_split_print.
user/dyrcona/checksum-debug-output
author
Jason Stephenson
<jstephenson@mvlc.org>
Tue, 23 Oct 2012 17:23:14 +0000
(13:23 -0400)
committer
Jason Stephenson
<jstephenson@mvlc.org>
Tue, 23 Oct 2012 17:23:14 +0000
(13:23 -0400)
The checksum needs to be a 16bit value, so we pack, then unpack the
checksum total in debug_split_print to guarantee that. Some longer
messages have generated 32-bit checksums.
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Sip/Checksum.pm
patch
|
blob
|
history
diff --git
a/Sip/Checksum.pm
b/Sip/Checksum.pm
index
389a0f8
..
71dd59b
100644
(file)
--- a/
Sip/Checksum.pm
+++ b/
Sip/Checksum.pm
@@
-59,7
+59,8
@@
sub debug_split_print {
printf STDERR "= %4d\n\n", $subtotal;
}
printf STDERR "%56d\n", $total;
- return $total;
+ # Pack, then upack to make sure we have 16-bit value.
+ return unpack("S", pack("S", $total));
}