Archived
3
0
This commit is contained in:
lapupe 2016-09-21 17:44:46 +02:00
commit 8c4e831a6b
18 changed files with 4 additions and 4 deletions

View File

@ -49,7 +49,7 @@ void pubsubd_msg_unserialize (struct pubsub_msg *msg, const char *buf, size_t ml
cbor_item_t * item = cbor_load ((unsigned char *) buf, mlen, &result); cbor_item_t * item = cbor_load ((unsigned char *) buf, mlen, &result);
struct cbor_pair * pair = cbor_map_handle (item); struct cbor_pair * pair = cbor_map_handle (item);
cbor_mutable_data *data = cbor_bytestring_handle (pair->value); cbor_mutable_data data = cbor_bytestring_handle (pair->value);
msg->type = cbor_get_uint8 (pair->key); msg->type = cbor_get_uint8 (pair->key);
if (msg->type != PUBSUB_TYPE_DISCONNECT) { if (msg->type != PUBSUB_TYPE_DISCONNECT) {

View File

@ -10,7 +10,7 @@ TESTS=$(addsuffix .test, $(EXEC))
all: $(SOURCES) $(EXEC) all: $(SOURCES) $(EXEC)
$(EXEC): $(OBJECTS) $(CFILES) $(EXEC): $(OBJECTS) $(CFILES)
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) $@.c -o $@.bin $(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) $@.c -lcbor -o $@.bin
.c.o: .c.o:
$(CC) -c $(CFLAGS) $< -o $@ $(CC) -c $(CFLAGS) $< -o $@

View File

@ -3,7 +3,7 @@ CFLAGS=-Wall -g -Wextra
LDFLAGS= -pthread LDFLAGS= -pthread
CFILES=$(wildcard *.c) # CFILES => recompiles everything on a C file change CFILES=$(wildcard *.c) # CFILES => recompiles everything on a C file change
EXEC=$(basename $(wildcard *.c)) EXEC=$(basename $(wildcard *.c))
SOURCES=$(wildcard ../lib/*.c) SOURCES=$(wildcard ../lib/*.c ../../lib/*.c)
OBJECTS=$(SOURCES:.c=.o) OBJECTS=$(SOURCES:.c=.o)
TESTS=$(addsuffix .test, $(EXEC)) TESTS=$(addsuffix .test, $(EXEC))

View File

@ -1,7 +1,7 @@
#ifndef __PUBSUBD_H__ #ifndef __PUBSUBD_H__
#define __PUBSUBD_H__ #define __PUBSUBD_H__
#include "pubsub.h" #include "../../lib/pubsub.h"
#include <pthread.h> #include <pthread.h>
struct channel; struct channel;