]> source.dussan.org Git - jgit.git/commitdiff
Decode side-band channel number as unsigned integer 89/289/4
authorShawn O. Pearce <spearce@spearce.org>
Tue, 9 Feb 2010 17:44:24 +0000 (09:44 -0800)
committerShawn O. Pearce <spearce@spearce.org>
Sat, 13 Mar 2010 00:08:13 +0000 (16:08 -0800)
This field is unsigned in the protocol, so treat it
as such when we report the channel number in errors.

Change-Id: I20a52809c7a756e9f66b3557a4300ae1e11f6d25
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.eclipse.jgit/src/org/eclipse/jgit/transport/SideBandInputStream.java

index 7b5422644a4135917b62e678dd9deac59385c834..5f3b34e6fa9e225d5cdbff5e45d1319ab4f137ef 100644 (file)
@@ -148,7 +148,7 @@ class SideBandInputStream extends InputStream {
                                return;
                        }
 
-                       channel = rawIn.read();
+                       channel = rawIn.read() & 0xff;
                        available -= HDR_SIZE; // length header plus channel indicator
                        if (available == 0)
                                continue;