mirror of https://github.com/apache/activemq.git
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. git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@358068 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
14679fde39
commit
33c61803de
|
@ -163,9 +163,15 @@ apr_status_t amqcs_connect(amqcs_connection **conn, amqcs_connect_options *optio
|
|||
{
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue