Merge branch 'master' of http://git.karchnu.fr/Karchnu/perfectos-junk into pongd
This commit is contained in:
commit
8c4e831a6b
@ -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) {
|
||||||
|
@ -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 $@
|
||||||
|
@ -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))
|
||||||
|
|
@ -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;
|
Reference in New Issue
Block a user