compile on Raspian with http only

closes #85
This commit is contained in:
Jan-Piet Mens
2016-02-21 18:45:09 +01:00
parent 100154a97d
commit 929cddcaac

View File

@@ -621,7 +621,7 @@ void handle_message(void *userdata, char *topic, char *payload, size_t payloadle
time(&now);
monitorhook(ud, now, topic);
debug(ud, "%s (plen=%d, r=%d)", topic, payloadlen, retain);
debug(ud, "%s (plen=%d, r=%d) [%s]", topic, payloadlen, retain, payload);
if (payloadlen == 0) {
return;
}
@@ -1271,7 +1271,9 @@ int main(int argc, char **argv)
#ifdef WITH_LUA
char *luascript = NULL;
#endif
int loop_timeout = 0;
#if WITH_MQTT
int loop_timeout = 1000;
#endif
int ch, initialize = FALSE;
static struct udata udata, *ud = &udata;
#ifdef WITH_HTTP
@@ -1751,13 +1753,6 @@ int main(int argc, char **argv)
olog(LOG_INFO, "Using storage at %s with precision %d", STORAGEDIR, geohash_prec());
#ifdef WITH_HTTP
if (udata.mgserver == NULL)
loop_timeout = 1000;
#else
loop_timeout = 1000;
#endif
while (run) {
#ifdef WITH_MQTT
rc = mosquitto_loop(mosq, loop_timeout, /* max-packets */ 1);