Bugzilla – Attachment 5164 Details for
Bug 6765
Enable correct checksums for UTF-8 encoded data
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Signed off Patch
0001-Bug-6765-sip2-unicode-checksum.patch (text/plain), 1.29 KB, created by
Ian Walls
on 2011-08-26 16:29:14 UTC
(
hide
)
Description:
Signed off Patch
Filename:
MIME Type:
Creator:
Ian Walls
Created:
2011-08-26 16:29:14 UTC
Size:
1.29 KB
patch
obsolete
>From 65fff0bb3cb5ef1a95e2a88b01cd4734482862b7 Mon Sep 17 00:00:00 2001 >From: Ulrich Kleiber <ulrich.kleiber@bsz-bw.de> >Date: Fri, 29 Jul 2011 16:35:40 +0200 >Subject: [PATCH] Bug 6765: sip2 unicode checksum > >Changes checksum calculation method, as per Dan Scott's fix in openncip. >see http://sourceforge.net/tracker/?func=detail&aid=2925760&group_id=161781&atid=821216 > >http://bugs.koha-community.org/show_bug.cgi?id=6765 >Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com> >--- > C4/SIP/Sip/Checksum.pm | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/SIP/Sip/Checksum.pm b/C4/SIP/Sip/Checksum.pm >index e88567a..ed102c7 100644 >--- a/C4/SIP/Sip/Checksum.pm >+++ b/C4/SIP/Sip/Checksum.pm >@@ -10,7 +10,7 @@ our $debug = 0; > > sub checksum { > my $pkt = shift; >- return (-unpack('%16U*', $pkt) & 0xFFFF); >+ return (-unpack('%16C*', $pkt) & 0xFFFF); > } > > sub verify_cksum { >@@ -29,7 +29,7 @@ sub verify_cksum { > # Convert the checksum back to hex and calculate the sum of the > # pack without the checksum. > $cksum = hex($1); >- $shortsum = unpack("%16U*", substr($pkt, 0, -4)); >+ $shortsum = unpack("%16C*", substr($pkt, 0, -4)); > > # The checksum is valid if the hex sum, plus the checksum of the > # base packet short when truncated to 16 bits. >-- >1.7.4.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 6765
:
5102
| 5164