activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r358068 - /incubator/activemq/trunk/openwire-c/src/libactivemq/amqcs.c
Date Tue, 20 Dec 2005 18:51:47 GMT
Author: chirino
Date: Tue Dec 20 10:48:58 2005
New Revision: 358068

URL: http://svn.apache.org/viewcvs?rev=358068&view=rev
Log:
Leave the clientId username and password fields null instead of setting them to "" if no value
is specified.
Connection was failing due to broker expecting to be null if not set.

Modified:
    incubator/activemq/trunk/openwire-c/src/libactivemq/amqcs.c

Modified: incubator/activemq/trunk/openwire-c/src/libactivemq/amqcs.c
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-c/src/libactivemq/amqcs.c?rev=358068&r1=358067&r2=358068&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-c/src/libactivemq/amqcs.c (original)
+++ incubator/activemq/trunk/openwire-c/src/libactivemq/amqcs.c Tue Dec 20 10:48:58 2005
@@ -163,9 +163,15 @@
    {
       connection->info = ow_ConnectionInfo_create(pool);
       connection->info->connectionId = create_ConnectionId(connection, pool);
-      connection->info->clientId = ow_string_create_from_cstring(pool, options->clientId);
-      connection->info->userName = ow_string_create_from_cstring(pool, options->userId);
-      connection->info->password = ow_string_create_from_cstring(pool, options->password);
     
+      if( strlen(options->clientId)>0 ) {
+         connection->info->clientId = ow_string_create_from_cstring(pool, options->clientId);
+      }
+      if( strlen(options->userId)>0 ) {
+         connection->info->userName = ow_string_create_from_cstring(pool, options->userId);
+      }
+      if( strlen(options->password)>0 ) {
+         connection->info->password = ow_string_create_from_cstring(pool, options->password);
     
+      }
       rc = amqcs_sync_send( connection, (ow_BaseCommand*)connection->info, temp_pool );
       CHECK_SUCCESS;
    }



Mime
View raw message