Skip to content

Instantly share code, notes, and snippets.

@OlegHahm
Created March 4, 2018 18:26
Show Gist options
  • Save OlegHahm/5c6034994e324f6c2769c00fc6802f7a to your computer and use it in GitHub Desktop.
Save OlegHahm/5c6034994e324f6c2769c00fc6802f7a to your computer and use it in GitHub Desktop.
diff --git a/content/Makefile b/content/Makefile
index 5ee6e47..b240241 100644
--- a/content/Makefile
+++ b/content/Makefile
@@ -5,7 +5,7 @@ BOARD ?= native
BOARD_WHITELIST := fox iotlab-m3 msba2 mulle native pba-d-01-kw2x samr21-xpro
#RIOTBASE ?= $(CURDIR)/../../riot
-RIOTBASE ?= $(CURDIR)/../..
+RIOTBASE ?= $(CURDIR)/../../RIOT
CFLAGS += -DDEVELHELP
CFLAGS += -DUSE_LINKLAYER
@@ -29,7 +29,6 @@ USEMODULE += gnrc_netdev_default
USEMODULE += auto_init_gnrc_netif
USEMODULE += timex
USEMODULE += xtimer
-USEMODULE += xcell
USEMODULE += random
USEMODULE += prng_minstd
diff --git a/content/content.c b/content/content.c
index dbe0132..1dbd703 100644
--- a/content/content.c
+++ b/content/content.c
@@ -1,3 +1,5 @@
+#include "ccnl-pkt-builder.h"
+#include "ccnl-defs.h"
#include "content.h"
@@ -13,7 +15,9 @@ int content_mk_content_object(struct ccnl_relay_s *relay, struct ccnl_face_s *fr
int result = -1;
/*** The function \ref ccnl_mkContentObject calls ccnl_mk_SimpleContent and duplicates prefix */
- struct ccnl_content_s *content = ccnl_mkContentObject(pkt->pfx, _default_content, strnlen(_default_content, 5), NULL);
+ unsigned char tmp[6];
+ memcpy(tmp, _default_content, 6);
+ struct ccnl_content_s *content = ccnl_mkContentObject(pkt->pfx, tmp, strnlen(_default_content, 5), NULL);
if (content) {
/** copy/paste from \ref ccnl_cs_dump */
diff --git a/content/main.c b/content/main.c
index 64c976f..996e0bd 100644
--- a/content/main.c
+++ b/content/main.c
@@ -20,6 +20,7 @@
#include "debug.h"
#include "content.h"
#include "ccnl-producer.h"
+#include "ccnl-pkt-builder.h"
#include "msg.h"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment