Fix for previous commit

Stdin mode wouldn't work with normal compiler optimisation levels.
pull/1514/head
Roger A. Light 6 years ago
parent 4e7e6c641f
commit 74e1f77310

@ -45,6 +45,7 @@ static int line_buf_len = 1024;
static bool disconnect_sent = false; static bool disconnect_sent = false;
static int publish_count = 0; static int publish_count = 0;
static bool ready_for_repeat = false; static bool ready_for_repeat = false;
static volatile int status = STATUS_CONNECTING;
#ifdef WIN32 #ifdef WIN32
static uint64_t next_publish_tv; static uint64_t next_publish_tv;
@ -223,7 +224,7 @@ int pub_shared_loop(struct mosquitto *mosq)
{ {
int read_len; int read_len;
int pos; int pos;
int rc; int rc = MOSQ_ERR_SUCCESS;
char *buf2; char *buf2;
int buf_len_actual; int buf_len_actual;
int mode; int mode;

@ -37,7 +37,6 @@ Contributors:
/* Global variables for use in callbacks. See sub_client.c for an example of /* Global variables for use in callbacks. See sub_client.c for an example of
* using a struct to hold variables for use in callbacks. */ * using a struct to hold variables for use in callbacks. */
int mid_sent = -1; int mid_sent = -1;
int status = STATUS_CONNECTING;
struct mosq_config cfg; struct mosq_config cfg;
void my_log_callback(struct mosquitto *mosq, void *obj, int level, const char *str) void my_log_callback(struct mosquitto *mosq, void *obj, int level, const char *str)

@ -23,7 +23,6 @@ Contributors:
#define STATUS_DISCONNECTED 4 #define STATUS_DISCONNECTED 4
extern int mid_sent; extern int mid_sent;
extern int status;
extern struct mosq_config cfg; extern struct mosq_config cfg;

Loading…
Cancel
Save