From: <cin...@us...> - 2009-10-03 15:58:40
|
Revision: 1038 http://firebird.svn.sourceforge.net/firebird/?rev=1038&view=rev Author: cincura_net Date: 2009-10-03 15:56:54 +0000 (Sat, 03 Oct 2009) Log Message: ----------- * Conditional for protocol12. Modified Paths: -------------- NETProvider/trunk/NETProvider/source/FirebirdSql/Data/Client/Managed/Version10/GdsBlob.cs NETProvider/trunk/NETProvider/source/FirebirdSql/Data/Client/Managed/Version10/GdsConnection.cs NETProvider/trunk/NETProvider/source/FirebirdSql/Data/Client/Managed/Version12/GdsDatabase.cs NETProvider/trunk/NETProvider/source/FirebirdSql/Data/FirebirdClient/ClientFactory.cs Modified: NETProvider/trunk/NETProvider/source/FirebirdSql/Data/Client/Managed/Version10/GdsBlob.cs =================================================================== --- NETProvider/trunk/NETProvider/source/FirebirdSql/Data/Client/Managed/Version10/GdsBlob.cs 2009-10-03 15:56:21 UTC (rev 1037) +++ NETProvider/trunk/NETProvider/source/FirebirdSql/Data/Client/Managed/Version10/GdsBlob.cs 2009-10-03 15:56:54 UTC (rev 1038) @@ -104,7 +104,7 @@ this.database.Write(IscCodes.op_get_segment); this.database.Write(this.blobHandle); this.database.Write((requested + 2 < short.MaxValue) ? requested + 2 : short.MaxValue); - this.database.Write((int)0); // Data segment + this.database.Write(0); // Data segment this.database.Flush(); GenericResponse response = this.database.ReadGenericResponse(); Modified: NETProvider/trunk/NETProvider/source/FirebirdSql/Data/Client/Managed/Version10/GdsConnection.cs =================================================================== --- NETProvider/trunk/NETProvider/source/FirebirdSql/Data/Client/Managed/Version10/GdsConnection.cs 2009-10-03 15:56:21 UTC (rev 1037) +++ NETProvider/trunk/NETProvider/source/FirebirdSql/Data/Client/Managed/Version10/GdsConnection.cs 2009-10-03 15:56:54 UTC (rev 1038) @@ -168,6 +168,9 @@ outputStream.Write(1); // Architecture of client - Generic outputStream.Write(database); // Database path +#if (PROTOCOL_VERSION12) + outputStream.Write(3); // Protocol versions understood +#endif outputStream.Write(2); // Protocol versions understood outputStream.WriteBuffer(user_id.ToArray()); // User identification Stuff @@ -183,14 +186,14 @@ outputStream.Write(5); // Maximum type (ptype_lazy_send) outputStream.Write(1); // Preference weight -#if false +#if (PROTOCOL_VERSION12) outputStream.Write(IscCodes.PROTOCOL_VERSION12);// Protocol version outputStream.Write(1); // Architecture of client - Generic outputStream.Write(2); // Minumum type (ptype_rpc) outputStream.Write(5); // Maximum type (ptype_lazy_send) outputStream.Write(2); // Preference weight #endif - } + } outputStream.Flush(); if (inputStream.ReadOperation() == IscCodes.op_accept) Modified: NETProvider/trunk/NETProvider/source/FirebirdSql/Data/Client/Managed/Version12/GdsDatabase.cs =================================================================== --- NETProvider/trunk/NETProvider/source/FirebirdSql/Data/Client/Managed/Version12/GdsDatabase.cs 2009-10-03 15:56:21 UTC (rev 1037) +++ NETProvider/trunk/NETProvider/source/FirebirdSql/Data/Client/Managed/Version12/GdsDatabase.cs 2009-10-03 15:56:54 UTC (rev 1038) @@ -17,6 +17,8 @@ * All Rights Reserved. */ +#if (PROTOCOL_VERSION12) + using System; using System.Collections; using System.Data; @@ -40,7 +42,7 @@ { // Attach to the database this.Write(IscCodes.op_attach); - this.Write((int)0); // Database object ID + this.Write(0); // Database object ID dpb.Append(IscCodes.isc_dpb_utf8_filename, 0); this.WriteBuffer(Encoding.UTF8.GetBytes(database)); // Database PATH this.WriteBuffer(dpb.ToArray()); // DPB Parameter buffer @@ -49,10 +51,12 @@ protected override void SendCreateToBuffer(DatabaseParameterBuffer dpb, string database) { this.Write(IscCodes.op_create); - this.Write((int)0); + this.Write(0); dpb.Append(IscCodes.isc_dpb_utf8_filename, 0); this.WriteBuffer(Encoding.UTF8.GetBytes(database)); this.WriteBuffer(dpb.ToArray()); } } -} \ No newline at end of file +} + +#endif \ No newline at end of file Modified: NETProvider/trunk/NETProvider/source/FirebirdSql/Data/FirebirdClient/ClientFactory.cs =================================================================== --- NETProvider/trunk/NETProvider/source/FirebirdSql/Data/FirebirdClient/ClientFactory.cs 2009-10-03 15:56:21 UTC (rev 1037) +++ NETProvider/trunk/NETProvider/source/FirebirdSql/Data/FirebirdClient/ClientFactory.cs 2009-10-03 15:56:54 UTC (rev 1038) @@ -82,8 +82,10 @@ switch (connection.ProtocolVersion) { +#if (PROTOCOL_VERSION12) case IscCodes.PROTOCOL_VERSION12: return new FirebirdSql.Data.Client.Managed.Version12.GdsDatabase(connection); +#endif case IscCodes.PROTOCOL_VERSION11: return new FirebirdSql.Data.Client.Managed.Version11.GdsDatabase(connection); case IscCodes.PROTOCOL_VERSION10: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |