diff --git a/include/amqpcpp/address.h b/include/amqpcpp/address.h index efccf8e..c8faaa1 100644 --- a/include/amqpcpp/address.h +++ b/include/amqpcpp/address.h @@ -67,9 +67,12 @@ public: const char *last = data + size; // must start with ampqs:// to have a secure connection (and we also assign a different default port) - if ((_secure = strncmp(data, "amqps://", 8) == 0)) _port = 5671; + _secure = strncmp(data, "amqps://", 8) == 0; - // otherwise protocol must be amqp:// + // default port changes for secure connections + if (_secure) _port = 5671; + + // otherwise protocol must be amqp:// else if (strncmp(data, "amqp://", 7) != 0) throw std::runtime_error("AMQP address should start with \"amqp://\" or \"amqps://\""); // begin of the string was parsed @@ -142,7 +145,7 @@ public: * @param port * @param login * @param vhost - * @param secure + * @param secure */ Address(std::string host, uint16_t port, Login login, std::string vhost, bool secure = false) : _secure(secure), diff --git a/include/amqpcpp/endian.h b/include/amqpcpp/endian.h index f1adab9..72242a6 100644 --- a/include/amqpcpp/endian.h +++ b/include/amqpcpp/endian.h @@ -58,7 +58,7 @@ #include #pragma comment(lib,"Ws2_32.lib") -//# include +//# include #if BYTE_ORDER == LITTLE_ENDIAN diff --git a/include/amqpcpp/libboostasio.h b/include/amqpcpp/libboostasio.h index c6fb532..acdf538 100644 --- a/include/amqpcpp/libboostasio.h +++ b/include/amqpcpp/libboostasio.h @@ -176,7 +176,7 @@ protected: TcpConnection *const connection, const int fd) { - // Resolve any potential problems with dangling pointers + // Resolve any potential problems with dangling pointers // (remember we are using async). const std::shared_ptr apWatcher = awpWatcher.lock(); if (!apWatcher) { return; } @@ -210,7 +210,7 @@ protected: TcpConnection *const connection, const int fd) { - // Resolve any potential problems with dangling pointers + // Resolve any potential problems with dangling pointers // (remember we are using async). const std::shared_ptr apWatcher = awpWatcher.lock(); if (!apWatcher) { return; } @@ -498,7 +498,7 @@ protected: // construct a new pair (watcher/timer), and put it in the map const std::shared_ptr apWatcher = - std::make_shared(_ioservice, _strand, fd); + std::make_shared(_ioservice, _strand, fd); _watchers[fd] = apWatcher;