Signed-off-by: Chris Elston <chris.elston@sancloud.com>
Adds the following bridge configuration as parameters for dynamic
bridges:
- remote_username
- try_private
- notification_topic
- remote_clientid
Signed-off-by: Chris Elston <chris.elston@sancloud.com>
Sending an empty packet to $BRIDGE/new would cause a segfault because
the payload pointer was accessed without checking for NULL.
This change rejects an empty payload with MOSQ_ERR_INVAL.
Signed-off-by: Chris Elston <chris.elston@sancloud.com>
The first packet sent by a dynamic bridge was failing because it was
sent before the socket was fully established and the OS returned
-EAGAIN. We had to wait for the next PINGREQ to cause the initial packet
to be sent, and therefore bridge startup was delayed by the
configured keepalive timeout (default 60 seconds).
This change adds the new bridge's output socket to the list managed by
the mux, and we now send the initial CONNECT as soon as the output
socket becomes available.
Use the libdir variable from config.mk just like lib/ uses to ensure
that the plugins are installed into the same location as the library.
This fixes systems that use lib64 for libraries like most 64 bit
Linux distributions.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
The code would simply append the folder with no separator, resulting in an invalid path if the variable was not empty.
Now properly append it.
Signed-off-by: Pierre Hallot <hallotpierre@gmail.com>
https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html
"Note Call the cmake_minimum_required() command at the beginning of the top-level CMakeLists.txt file even before calling the project() command. It is important to establish version and policy settings before invoking other commands whose behavior they may affect."
Signed-off-by: Pierre Hallot <hallotpierre@gmail.com>
According to this from the mailing list, it is no longer required since the minimum cmake required is 3.0.
https://cmake.org/pipermail/cmake/2014-July/058048.html
"The code that emits the warning is run by "project()". Since you do not have an explicit project() call in your top-level CMakeLists.txt CMake adds one to the top implicitly. [1]
A project file that explicitly calls project() after requiring CMake >= 2.8.4 should make the warning go away."
Signed-off-by: Pierre Hallot <hallotpierre@gmail.com>