You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by st...@apache.org on 2006/12/19 23:14:20 UTC

svn commit: r488830 - in /incubator/qpid/trunk/qpid/dotnet: ./ Qpid.Buffer/ Qpid.Client.Tests/ Qpid.Client.Tests/failover/ Qpid.Client.Tests/url/ Qpid.Client.Transport.Socket.Blocking/ Qpid.Client/Client/ Qpid.Client/Client/Collections/ Qpid.Client/Cli...

Author: steshaw
Date: Tue Dec 19 14:14:19 2006
New Revision: 488830

URL: http://svn.apache.org/viewvc?view=rev&rev=488830
Log:
Added Qpid.Client.Transport.Socket.Blocking project to MonoDevelop files.
Fixed some compiler warnings.

Added:
    incubator/qpid/trunk/qpid/dotnet/Qpid.Client.Transport.Socket.Blocking/Qpid.Client.Transport.Socket.Blocking.mdp
Modified:
    incubator/qpid/trunk/qpid/dotnet/Qpid.Buffer/ByteBuffer.cs
    incubator/qpid/trunk/qpid/dotnet/Qpid.Client.Tests/Qpid.Client.Tests.mdp
    incubator/qpid/trunk/qpid/dotnet/Qpid.Client.Tests/failover/FailoverTxTest.cs
    incubator/qpid/trunk/qpid/dotnet/Qpid.Client.Tests/url/ConnectionUrlTest.cs
    incubator/qpid/trunk/qpid/dotnet/Qpid.Client.Transport.Socket.Blocking/BlockingSocketTransport.cs
    incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/AmqBrokerInfo.cs
    incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/AmqChannel.cs
    incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/Collections/LinkedHashtable.cs
    incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/Handler/ConnectionCloseOkHandler.cs
    incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/Message/AbstractQmsMessage.cs
    incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/Message/QpidBytesMessage.cs
    incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/QpidConnectionInfo.cs
    incubator/qpid/trunk/qpid/dotnet/Qpid.Common/Collections/LinkedHashtable.cs
    incubator/qpid/trunk/qpid/dotnet/Qpid.Common/Collections/SynchronousQueue.cs
    incubator/qpid/trunk/qpid/dotnet/Qpid.Common/Framing/AMQDataBlockDecoder.cs
    incubator/qpid/trunk/qpid/dotnet/dotnet.mds

Modified: incubator/qpid/trunk/qpid/dotnet/Qpid.Buffer/ByteBuffer.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/Qpid.Buffer/ByteBuffer.cs?view=diff&rev=488830&r1=488829&r2=488830
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/Qpid.Buffer/ByteBuffer.cs (original)
+++ incubator/qpid/trunk/qpid/dotnet/Qpid.Buffer/ByteBuffer.cs Tue Dec 19 14:14:19 2006
@@ -2375,14 +2375,6 @@
             return this;
         }
 
-        private static void checkFieldSize( int fieldSize )
-        {
-            if( fieldSize < 0 )
-            {
-                throw new ArgumentOutOfRangeException("fieldSize");
-            }
-        }
-
         public abstract void put(ushort value);
         public abstract ushort GetUnsignedShort();
         public abstract uint GetUnsignedInt();

Modified: incubator/qpid/trunk/qpid/dotnet/Qpid.Client.Tests/Qpid.Client.Tests.mdp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/Qpid.Client.Tests/Qpid.Client.Tests.mdp?view=diff&rev=488830&r1=488829&r2=488830
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/Qpid.Client.Tests/Qpid.Client.Tests.mdp (original)
+++ incubator/qpid/trunk/qpid/dotnet/Qpid.Client.Tests/Qpid.Client.Tests.mdp Tue Dec 19 14:14:19 2006
@@ -28,6 +28,7 @@
     <File name="./requestreply1/ServiceRequestingClient.cs" subtype="Code" buildaction="Compile" />
     <File name="./undeliverable/UndeliverableTest.cs" subtype="Code" buildaction="Compile" />
     <File name="./url/ConnectionUrlTest.cs" subtype="Code" buildaction="Compile" />
+    <File name="./log4net.config" subtype="Code" buildaction="FileCopy" />
   </Contents>
   <References>
     <ProjectReference type="Gac" localcopy="True" refto="System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
@@ -36,5 +37,6 @@
     <ProjectReference type="Project" localcopy="True" refto="Qpid.Client" />
     <ProjectReference type="Project" localcopy="True" refto="Qpid.Messaging" />
     <ProjectReference type="Project" localcopy="True" refto="Qpid.Common" />
+    <ProjectReference type="Project" localcopy="True" refto="Qpid.Client.Transport.Socket.Blocking" />
   </References>
 </Project>

Modified: incubator/qpid/trunk/qpid/dotnet/Qpid.Client.Tests/failover/FailoverTxTest.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/Qpid.Client.Tests/failover/FailoverTxTest.cs?view=diff&rev=488830&r1=488829&r2=488830
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/Qpid.Client.Tests/failover/FailoverTxTest.cs (original)
+++ incubator/qpid/trunk/qpid/dotnet/Qpid.Client.Tests/failover/FailoverTxTest.cs Tue Dec 19 14:14:19 2006
@@ -220,19 +220,19 @@
         {
             Console.WriteLine("TestWithBasicInfo");
             Console.WriteLine(".NET Framework version: " + RuntimeEnvironment.GetSystemVersion());
-            try
-            {
+//            try
+//            {
                 QpidConnectionInfo connectionInfo = new QpidConnectionInfo();
                 
                 connectionInfo.AddBrokerInfo(new AmqBrokerInfo("amqp", "localhost", 5672, false));
                 connectionInfo.AddBrokerInfo(new AmqBrokerInfo("amqp", "localhost", 5673, false));
                 
                 DoFailoverTxTest(connectionInfo);
-            }
-            catch (Exception e)
-            {
-                _log.Error("Exception caught", e);
-            }
+//            }
+//            catch (Exception e)
+//            {
+//                _log.Error("Exception caught", e);
+//            }
         }
 
         //[Test]

Modified: incubator/qpid/trunk/qpid/dotnet/Qpid.Client.Tests/url/ConnectionUrlTest.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/Qpid.Client.Tests/url/ConnectionUrlTest.cs?view=diff&rev=488830&r1=488829&r2=488830
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/Qpid.Client.Tests/url/ConnectionUrlTest.cs (original)
+++ incubator/qpid/trunk/qpid/dotnet/Qpid.Client.Tests/url/ConnectionUrlTest.cs Tue Dec 19 14:14:19 2006
@@ -295,7 +295,7 @@
                 QpidConnectionInfo.FromUrl(url);
                 Assert.Fail("URL has no virtual host should not parse");
             }
-            catch (UrlSyntaxException e)
+            catch (UrlSyntaxException)
             {
                 // This should occur.
             }

Modified: incubator/qpid/trunk/qpid/dotnet/Qpid.Client.Transport.Socket.Blocking/BlockingSocketTransport.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/Qpid.Client.Transport.Socket.Blocking/BlockingSocketTransport.cs?view=diff&rev=488830&r1=488829&r2=488830
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/Qpid.Client.Transport.Socket.Blocking/BlockingSocketTransport.cs (original)
+++ incubator/qpid/trunk/qpid/dotnet/Qpid.Client.Transport.Socket.Blocking/BlockingSocketTransport.cs Tue Dec 19 14:14:19 2006
@@ -29,7 +29,7 @@
 {
     public class BlockingSocketTransport : ITransport
     {
-        static readonly ILog _log = LogManager.GetLogger(typeof(BlockingSocketTransport));
+//        static readonly ILog _log = LogManager.GetLogger(typeof(BlockingSocketTransport));
 
         // Configuration variables.
         string _host;

Added: incubator/qpid/trunk/qpid/dotnet/Qpid.Client.Transport.Socket.Blocking/Qpid.Client.Transport.Socket.Blocking.mdp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/Qpid.Client.Transport.Socket.Blocking/Qpid.Client.Transport.Socket.Blocking.mdp?view=auto&rev=488830
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/Qpid.Client.Transport.Socket.Blocking/Qpid.Client.Transport.Socket.Blocking.mdp (added)
+++ incubator/qpid/trunk/qpid/dotnet/Qpid.Client.Transport.Socket.Blocking/Qpid.Client.Transport.Socket.Blocking.mdp Tue Dec 19 14:14:19 2006
@@ -0,0 +1,30 @@
+<Project name="Qpid.Client.Transport.Socket.Blocking" fileversion="2.0" language="C#" clr-version="Net_1_1" ctype="DotNetProject">
+  <Configurations active="Debug">
+    <Configuration name="Debug" ctype="DotNetProjectConfiguration">
+      <Output directory="./bin/Debug" assembly="Qpid.Client.Transport.Socket.Blocking" />
+      <Build debugmode="True" target="Library" />
+      <Execution runwithwarnings="True" consolepause="False" runtime="MsNet" clr-version="Net_1_1" />
+      <CodeGeneration compiler="Csc" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
+    </Configuration>
+    <Configuration name="Release" ctype="DotNetProjectConfiguration">
+      <Output directory="./bin/Release" assembly="Qpid.Client.Transport.Socket.Blocking" />
+      <Build debugmode="False" target="Library" />
+      <Execution runwithwarnings="True" consolepause="False" runtime="MsNet" clr-version="Net_1_1" />
+      <CodeGeneration compiler="Csc" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
+    </Configuration>
+  </Configurations>
+  <DeployTargets />
+  <Contents>
+    <File name="./Properties/AssemblyInfo.cs" subtype="Code" buildaction="Compile" />
+    <File name="./BlockingSocketProcessor.cs" subtype="Code" buildaction="Compile" />
+    <File name="./BlockingSocketTransport.cs" subtype="Code" buildaction="Compile" />
+    <File name="./ByteChannel.cs" subtype="Code" buildaction="Compile" />
+  </Contents>
+  <References>
+    <ProjectReference type="Gac" localcopy="True" refto="System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+    <ProjectReference type="Assembly" localcopy="True" refto="../Qpid.Common/lib/log4net/log4net.dll" />
+    <ProjectReference type="Project" localcopy="True" refto="Qpid.Buffer" />
+    <ProjectReference type="Project" localcopy="True" refto="Qpid.Client" />
+    <ProjectReference type="Project" localcopy="True" refto="Qpid.Common" />
+  </References>
+</Project>
\ No newline at end of file

Modified: incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/AmqBrokerInfo.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/AmqBrokerInfo.cs?view=diff&rev=488830&r1=488829&r2=488830
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/AmqBrokerInfo.cs (original)
+++ incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/AmqBrokerInfo.cs Tue Dec 19 14:14:19 2006
@@ -122,7 +122,7 @@
                                     found = true;
                                 }
                             }
-                            catch (Exception nfe) // XXX: should catch only "NumberFormatException" here
+                            catch (FormatException)
                             {
                                 looking = false;
                             }

Modified: incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/AmqChannel.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/AmqChannel.cs?view=diff&rev=488830&r1=488829&r2=488830
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/AmqChannel.cs (original)
+++ incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/AmqChannel.cs Tue Dec 19 14:14:19 2006
@@ -908,18 +908,6 @@
             DoQueueDeclare(queueName, isDurable, isExclusive, isAutoDelete);
         }
 
-        private string DoDeclareQueue(AMQDestination amqd)
-        {
-            string queueName = amqd.QueueName;
-            bool isDurable = amqd.IsDurable;
-            bool isExclusive = amqd.IsExclusive;
-
-            DoQueueDeclare(queueName, isDurable, isExclusive, amqd.AutoDelete);
-
-            _logger.Debug("returning amqp.QueueName = " + amqd.QueueName);
-            return amqd.QueueName;
-        }
-
         private void DoQueueDeclare(string queueName, bool isDurable, bool isExclusive, bool isAutoDelete)
         {
             _logger.Debug(string.Format("DeclareQueue name={0} durable={1} exclusive={2}, auto-delete={3}",

Modified: incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/Collections/LinkedHashtable.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/Collections/LinkedHashtable.cs?view=diff&rev=488830&r1=488829&r2=488830
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/Collections/LinkedHashtable.cs (original)
+++ incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/Collections/LinkedHashtable.cs Tue Dec 19 14:14:19 2006
@@ -1,6 +1,7 @@
 using System;
 using System.Collections;
 
+/*
 namespace Qpid.Collections
 {
     public class LinkedHashtable : DictionaryBase
@@ -212,3 +213,4 @@
         }
     }
 }
+*/
\ No newline at end of file

Modified: incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/Handler/ConnectionCloseOkHandler.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/Handler/ConnectionCloseOkHandler.cs?view=diff&rev=488830&r1=488829&r2=488830
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/Handler/ConnectionCloseOkHandler.cs (original)
+++ incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/Handler/ConnectionCloseOkHandler.cs Tue Dec 19 14:14:19 2006
@@ -32,7 +32,7 @@
         public void MethodReceived(AMQStateManager stateManager, AMQMethodEvent evt)
         {
             _logger.Debug("ConnectionCloseOk frame received");
-            ConnectionCloseOkBody method = (ConnectionCloseOkBody)evt.Method;
+//            ConnectionCloseOkBody method = (ConnectionCloseOkBody)evt.Method;
             stateManager.ChangeState(AMQState.CONNECTION_CLOSED);
         }
     }

Modified: incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/Message/AbstractQmsMessage.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/Message/AbstractQmsMessage.cs?view=diff&rev=488830&r1=488829&r2=488830
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/Message/AbstractQmsMessage.cs (original)
+++ incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/Message/AbstractQmsMessage.cs Tue Dec 19 14:14:19 2006
@@ -462,7 +462,7 @@
             }
         }
 
-        protected void Reset()
+        protected virtual void Reset()
         {
             _readableMessage = true;
         }

Modified: incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/Message/QpidBytesMessage.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/Message/QpidBytesMessage.cs?view=diff&rev=488830&r1=488829&r2=488830
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/Message/QpidBytesMessage.cs (original)
+++ incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/Message/QpidBytesMessage.cs Tue Dec 19 14:14:19 2006
@@ -330,7 +330,7 @@
             _data.put(bytes, offset, length);
         }
 
-        public void Reset()
+        protected override void Reset()
         {
             base.Reset();
             _data.flip();

Modified: incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/QpidConnectionInfo.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/QpidConnectionInfo.cs?view=diff&rev=488830&r1=488829&r2=488830
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/QpidConnectionInfo.cs (original)
+++ incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/QpidConnectionInfo.cs Tue Dec 19 14:14:19 2006
@@ -358,8 +358,6 @@
 
     public class QpidConnectionInfo : ConnectionInfo
     {
-        private static readonly ILog _logger = LogManager.GetLogger(typeof(QpidConnectionInfo));
-
         string _username = "guest";
         string _password = "guest";
         string _virtualHost = "/default";

Modified: incubator/qpid/trunk/qpid/dotnet/Qpid.Common/Collections/LinkedHashtable.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/Qpid.Common/Collections/LinkedHashtable.cs?view=diff&rev=488830&r1=488829&r2=488830
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/Qpid.Common/Collections/LinkedHashtable.cs (original)
+++ incubator/qpid/trunk/qpid/dotnet/Qpid.Common/Collections/LinkedHashtable.cs Tue Dec 19 14:14:19 2006
@@ -191,13 +191,13 @@
             }
         }
 
-        private LinkedDictionaryEntry Tail
-        {
-            get
-            {
-                return _tail;
-            }
-        }
+//        private LinkedDictionaryEntry Tail
+//        {
+//            get
+//            {
+//                return _tail;
+//            }
+//        }
 
         private class LHTEnumerator : IDictionaryEnumerator
         {

Modified: incubator/qpid/trunk/qpid/dotnet/Qpid.Common/Collections/SynchronousQueue.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/Qpid.Common/Collections/SynchronousQueue.cs?view=diff&rev=488830&r1=488829&r2=488830
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/Qpid.Common/Collections/SynchronousQueue.cs (original)
+++ incubator/qpid/trunk/qpid/dotnet/Qpid.Common/Collections/SynchronousQueue.cs Tue Dec 19 14:14:19 2006
@@ -28,17 +28,17 @@
         /// <summary>
         /// Lock protecting both wait queues
         /// </summary> 
-        private readonly object _qlock = new object();
+//        private readonly object _qlock = new object();
         
         /// <summary>
         /// Queue holding waiting puts
         /// </summary> 
-        private readonly WaitQueue _waitingProducers;
+//        private readonly WaitQueue _waitingProducers;
         
         /// <summary>
         /// Queue holding waiting takes
         /// </summary> 
-        private readonly WaitQueue _waitingConsumers;
+//        private readonly WaitQueue _waitingConsumers;
         
         /**
          * Queue to hold waiting puts/takes; specialized to Fifo/Lifo below.

Modified: incubator/qpid/trunk/qpid/dotnet/Qpid.Common/Framing/AMQDataBlockDecoder.cs
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/Qpid.Common/Framing/AMQDataBlockDecoder.cs?view=diff&rev=488830&r1=488829&r2=488830
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/Qpid.Common/Framing/AMQDataBlockDecoder.cs (original)
+++ incubator/qpid/trunk/qpid/dotnet/Qpid.Common/Framing/AMQDataBlockDecoder.cs Tue Dec 19 14:14:19 2006
@@ -130,7 +130,9 @@
             frame.PopulateFromBuffer(input, channel, bodySize, bodyFactory);
 
             byte marker = input.get();
-            //assert marker == 0xCE;
+            if (marker != 0xCE) {
+           		throw new FormatException("marker is not 0xCE"); 	
+            }
             return frame;
         }
 

Modified: incubator/qpid/trunk/qpid/dotnet/dotnet.mds
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/dotnet.mds?view=diff&rev=488830&r1=488829&r2=488830
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/dotnet.mds (original)
+++ incubator/qpid/trunk/qpid/dotnet/dotnet.mds Tue Dec 19 14:14:19 2006
@@ -8,6 +8,7 @@
       <Entry build="True" name="Qpid.Client" configuration="Debug" />
       <Entry build="True" name="Qpid.Client.Tests" configuration="Debug" />
       <Entry build="True" name="Qpid.Common.Tests" configuration="Debug" />
+      <Entry build="True" name="Qpid.Client.Transport.Socket.Blocking" configuration="Debug" />
     </Configuration>
     <Configuration name="Release" ctype="CombineConfiguration">
       <Entry build="True" name="Qpid.Messaging" configuration="Release" />
@@ -17,6 +18,7 @@
       <Entry build="True" name="Qpid.Client" configuration="Release" />
       <Entry build="True" name="Qpid.Client.Tests" configuration="Release" />
       <Entry build="True" name="Qpid.Common.Tests" configuration="Release" />
+      <Entry build="True" name="Qpid.Client.Transport.Socket.Blocking" configuration="Release" />
     </Configuration>
   </Configurations>
   <DeployTargets />
@@ -28,6 +30,7 @@
     <Execute type="None" entry="Qpid.Client" />
     <Execute type="None" entry="Qpid.Client.Tests" />
     <Execute type="None" entry="Qpid.Common.Tests" />
+    <Execute type="None" entry="Qpid.Client.Transport.Socket.Blocking" />
   </StartMode>
   <Entries>
     <Entry filename="./Qpid.Messaging/Qpid.Messaging.mdp" />
@@ -37,5 +40,6 @@
     <Entry filename="./Qpid.Client/Qpid.Client.mdp" />
     <Entry filename="./Qpid.Client.Tests/Qpid.Client.Tests.mdp" />
     <Entry filename="./Qpid.Common.Tests/Qpid.Common.Tests.mdp" />
+    <Entry filename="./Qpid.Client.Transport.Socket.Blocking/Qpid.Client.Transport.Socket.Blocking.mdp" />
   </Entries>
 </Combine>