dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[dotgnu-pnet-commits] pnetlib ChangeLog System.Net.IrDA/IrDAClient.cs...


From: Radek Polak
Subject: [dotgnu-pnet-commits] pnetlib ChangeLog System.Net.IrDA/IrDAClient.cs...
Date: Fri, 04 Jan 2008 23:32:19 +0000

CVSROOT:        /sources/dotgnu-pnet
Module name:    pnetlib
Changes by:     Radek Polak <radekp>    08/01/04 23:32:19

Modified files:
        .              : ChangeLog 
        System.Net.IrDA: IrDAClient.cs IrDADeviceInfo.cs IrDAEndPoint.cs 

Log message:
        some irda fixes

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pnetlib/ChangeLog?cvsroot=dotgnu-pnet&r1=1.2526&r2=1.2527
http://cvs.savannah.gnu.org/viewcvs/pnetlib/System.Net.IrDA/IrDAClient.cs?cvsroot=dotgnu-pnet&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/pnetlib/System.Net.IrDA/IrDADeviceInfo.cs?cvsroot=dotgnu-pnet&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/pnetlib/System.Net.IrDA/IrDAEndPoint.cs?cvsroot=dotgnu-pnet&r1=1.1&r2=1.2

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/dotgnu-pnet/pnetlib/ChangeLog,v
retrieving revision 1.2526
retrieving revision 1.2527
diff -u -b -r1.2526 -r1.2527
--- ChangeLog   7 Dec 2007 14:37:18 -0000       1.2526
+++ ChangeLog   4 Jan 2008 23:32:19 -0000       1.2527
@@ -1,3 +1,14 @@
+2008-01-05  Radek Polak  <address@hidden>
+
+       * System.Net.IrDA/IrDAClient.cs: Change to host byte order while
+       constructing device count.
+
+       * System.Net.IrDA/IrDADeviceInfo.cs: Remove unused function.
+
+       * System.Net.IrDA/IrDAEndPoint.cs: Make service name non empty. This is
+       needed for creating IrDA server socket on linux. Service name is here 
empty
+       which would throw exception later.
+
 2007-12-07  Heiko Weiss <address@hidden>
        * runtime/System/Resources/BuiltinResourceSet.cs: fixed a memory leak.
 

Index: System.Net.IrDA/IrDAClient.cs
===================================================================
RCS file: /sources/dotgnu-pnet/pnetlib/System.Net.IrDA/IrDAClient.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- System.Net.IrDA/IrDAClient.cs       26 May 2003 07:43:00 -0000      1.1
+++ System.Net.IrDA/IrDAClient.cs       4 Jan 2008 23:32:19 -0000       1.2
@@ -99,14 +99,14 @@
                                }
 
                                // Construct the device array.
-                               int num = IrDADeviceInfo.FetchInt32(data, 0);
+                               uint num = BitConverter.ToUInt32(data, 0);
                                if(num < 0)
                                {
                                        num = 0;
                                }
                                else if(num > maxDevices)
                                {
-                                       num = maxDevices;
+                                       num = (uint) maxDevices;
                                }
                                IrDADeviceInfo[] devs = new IrDADeviceInfo 
[num];
                                int posn;

Index: System.Net.IrDA/IrDADeviceInfo.cs
===================================================================
RCS file: /sources/dotgnu-pnet/pnetlib/System.Net.IrDA/IrDADeviceInfo.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- System.Net.IrDA/IrDADeviceInfo.cs   26 May 2003 07:43:00 -0000      1.1
+++ System.Net.IrDA/IrDADeviceInfo.cs   4 Jan 2008 23:32:19 -0000       1.2
@@ -52,13 +52,6 @@
                                characterSet = (IrDACharacterSet)(data[posn + 
28]);
                        }
 
-       // Fetch a host byte order Int32 from an array.
-       internal static int FetchInt32(byte[] data, int posn)
-                       {
-                               return ((data[0] << 24) | (data[1] << 16) |
-                                               (data[2] << 8) | data[3]);
-                       }
-
        // Get the device's properties.
        public IrDACharacterSet CharacterSet
                        {

Index: System.Net.IrDA/IrDAEndPoint.cs
===================================================================
RCS file: /sources/dotgnu-pnet/pnetlib/System.Net.IrDA/IrDAEndPoint.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- System.Net.IrDA/IrDAEndPoint.cs     26 May 2003 07:43:00 -0000      1.1
+++ System.Net.IrDA/IrDAEndPoint.cs     4 Jan 2008 23:32:19 -0000       1.2
@@ -100,6 +100,12 @@
                                        ++posn;
                                }
 
+                               // Make service name non empty on UNIX.
+                               if(builder.Length == 0)
+                               {
+                                       builder.Append("LSA");
+                               }
+
                                // Build and return the new end point.
                                return new IrDAEndPoint(deviceID, 
builder.ToString());
                        }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]