Return-Path: Delivered-To: apmail-geronimo-activemq-commits-archive@www.apache.org Received: (qmail 99796 invoked from network); 20 Dec 2005 18:58:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Dec 2005 18:58:30 -0000 Received: (qmail 96039 invoked by uid 500); 20 Dec 2005 18:56:58 -0000 Delivered-To: apmail-geronimo-activemq-commits-archive@geronimo.apache.org Received: (qmail 96026 invoked by uid 500); 20 Dec 2005 18:56:57 -0000 Mailing-List: contact activemq-commits-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-dev@geronimo.apache.org Delivered-To: mailing list activemq-commits@geronimo.apache.org Received: (qmail 96017 invoked by uid 99); 20 Dec 2005 18:56:57 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Dec 2005 10:56:57 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 20 Dec 2005 10:56:57 -0800 Received: (qmail 98898 invoked by uid 65534); 20 Dec 2005 18:55:21 -0000 Message-ID: <20051220185521.98828.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r358068 - /incubator/activemq/trunk/openwire-c/src/libactivemq/amqcs.c Date: Tue, 20 Dec 2005 18:51:47 -0000 To: activemq-commits@geronimo.apache.org From: chirino@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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; }