fixed auth method prefix extra / char
This commit is contained in:
parent
b9047f5ea7
commit
ab817384b1
|
|
@ -65,8 +65,9 @@ int main()
|
||||||
MyHandler handler(loop);
|
MyHandler handler(loop);
|
||||||
|
|
||||||
// make a connection
|
// make a connection
|
||||||
AMQP::TcpConnection connection(&handler, AMQP::Address("amqp://guest:guest@localhost/"));
|
AMQP::Address address("amqps://guest:guest@localhost/");
|
||||||
|
AMQP::TcpConnection connection(&handler, address);
|
||||||
|
|
||||||
// we need a channel too
|
// we need a channel too
|
||||||
AMQP::TcpChannel channel(&connection);
|
AMQP::TcpChannel channel(&connection);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ public:
|
||||||
else throw std::runtime_error("AMQP address should start with \"amqp://\" or \"amqps://\"");
|
else throw std::runtime_error("AMQP address should start with \"amqp://\" or \"amqps://\"");
|
||||||
|
|
||||||
// begin of the string was parsed
|
// begin of the string was parsed
|
||||||
data += 7;
|
data += _authmethod.length();
|
||||||
|
|
||||||
// do we have a '@' to split user-data and hostname?
|
// do we have a '@' to split user-data and hostname?
|
||||||
const char *at = (const char *)memchr(data, '@', last - data);
|
const char *at = (const char *)memchr(data, '@', last - data);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue