Permalink
Browse files

[180] Fix #includes in lib/send_mosq.c

Ensures that LWS_LIBRARY_VERSION_NUMBER is always present in all source
files when it is defined.

Thanks to dennisip86.

Bug: #180
  • Loading branch information...
1 parent ff78cd7 commit c035913b2a24a98cf5344589c68cff1edaa481f2 @ralight ralight committed May 31, 2016
Showing with 9 additions and 7 deletions.
  1. +2 −0 ChangeLog.txt
  2. +7 −7 lib/send_mosq.c
View
@@ -21,6 +21,8 @@ Broker:
- mosquitto_passwd utility now correctly deals with unknown command line
arguments in all cases. Closes #169.
- Fix publishing of $SYS/broker/clients/maximum
+- Fix order of #includes in lib/send_mosq.c to ensure struct mosquitto doesn't
+ differ between source files when websockets is being used. Closes #180.
Client library:
- Fix the case where a message received just before the keepalive timer
View
@@ -18,6 +18,13 @@ and the Eclipse Distribution License is available at
#include <stdio.h>
#include <string.h>
+#ifdef WITH_BROKER
+#include <mosquitto_broker.h>
+# ifdef WITH_SYS_TREE
+extern uint64_t g_pub_bytes_sent;
+# endif
+#endif
+
#include <mosquitto.h>
#include <mosquitto_internal.h>
#include <logging_mosq.h>
@@ -28,13 +35,6 @@ and the Eclipse Distribution License is available at
#include <time_mosq.h>
#include <util_mosq.h>
-#ifdef WITH_BROKER
-#include <mosquitto_broker.h>
-# ifdef WITH_SYS_TREE
-extern uint64_t g_pub_bytes_sent;
-# endif
-#endif
-
int _mosquitto_send_pingreq(struct mosquitto *mosq)
{
int rc;

0 comments on commit c035913

Please sign in to comment.