Skip to content

Commit

Permalink
Fix db_dump compilation.
Browse files Browse the repository at this point in the history
Closes #1520.
  • Loading branch information
ralight committed Dec 12, 2019
1 parent 36ec665 commit e5561cd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/db_dump/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ OBJS = \
send_disconnect.o \
stubs.o \
time_mosq.o \
topic_tok.o \
utf8_mosq.o

.PHONY: all clean reallyclean
Expand Down Expand Up @@ -63,6 +64,9 @@ send_disconnect.o : ../../lib/send_disconnect.c
time_mosq.o : ../../lib/time_mosq.c
${CROSS_COMPILE}${CC} $(CFLAGS_FINAL) -c $< -o $@

topic_tok.o : ../../src/topic_tok.c
${CROSS_COMPILE}${CC} $(CFLAGS_FINAL) -c $< -o $@

utf8_mosq.o : ../../lib/utf8_mosq.c
${CROSS_COMPILE}${CC} $(CFLAGS_FINAL) -c $< -o $@

Expand Down
12 changes: 10 additions & 2 deletions src/db_dump/stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ int db__message_store(struct mosquitto_db *db, const struct mosquitto *source, u
return 0;
}

void db__msg_store_ref_inc(struct mosquitto_msg_store *store)
{
}

int handle__packet(struct mosquitto_db *db, struct mosquitto *context)
{
Expand Down Expand Up @@ -41,6 +44,11 @@ FILE *mosquitto__fopen(const char *path, const char *mode, bool restrict_read)
return NULL;
}

enum mosquitto_client_state mosquitto__get_state(struct mosquitto *mosq)
{
return mosq_cs_new;
}

void *mosquitto__malloc(size_t len)
{
return malloc(len);
Expand All @@ -61,12 +69,12 @@ ssize_t net__write(struct mosquitto *mosq, void *buf, size_t count)
return 0;
}

int sub__add(struct mosquitto_db *db, struct mosquitto *context, const char *sub, int qos, uint32_t identifier, int options, struct mosquitto__subhier **root)
int retain__store(struct mosquitto_db *db, const char *topic, struct mosquitto_msg_store *stored, char **split_topics)
{
return 0;
}

int sub__messages_queue(struct mosquitto_db *db, const char *source_id, const char *topic, int qos, int retain, struct mosquitto_msg_store **stored)
int sub__add(struct mosquitto_db *db, struct mosquitto *context, const char *sub, int qos, uint32_t identifier, int options, struct mosquitto__subhier **root)
{
return 0;
}
Expand Down

0 comments on commit e5561cd

Please sign in to comment.