1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

ccnl: disable debug and fix warnings

This commit is contained in:
Oleg Hahm 2014-07-18 21:15:04 +02:00 committed by Oleg Hahm
parent 6973ee2f81
commit 19377261ac
5 changed files with 12 additions and 2 deletions

View File

@ -355,12 +355,14 @@ int ccnl_io_loop(struct ccnl_relay_s *ccnl)
handle_populate_cache(ccnl); handle_populate_cache(ccnl);
break; break;
#endif #endif
#if ENABLE_DEBUG
case (CCNL_RIOT_PRINT_STAT): case (CCNL_RIOT_PRINT_STAT):
/* cmd to print face statistics */ /* cmd to print face statistics */
for (struct ccnl_face_s *f = ccnl->faces; f; f = f->next) { for (struct ccnl_face_s *f = ccnl->faces; f; f = f->next) {
ccnl_face_print_stat(f); ccnl_face_print_stat(f);
} }
break; break;
#endif
case (CCNL_RIOT_CONFIG_CACHE): case (CCNL_RIOT_CONFIG_CACHE):
/* cmd to configure the size of the cache at runtime */ /* cmd to configure the size of the cache at runtime */
ccnl->max_cache_entries = in.content.value; ccnl->max_cache_entries = in.content.value;

View File

@ -528,7 +528,9 @@ ccnl_face_remove(struct ccnl_relay_s *ccnl, struct ccnl_face_s *f)
f->outq = tmp; f->outq = tmp;
} }
#if ENABLE_DEBUG
ccnl_face_print_stat(f); ccnl_face_print_stat(f);
#endif
f2 = f->next; f2 = f->next;
DBL_LINKED_LIST_REMOVE(ccnl->faces, f); DBL_LINKED_LIST_REMOVE(ccnl->faces, f);
@ -536,6 +538,7 @@ ccnl_face_remove(struct ccnl_relay_s *ccnl, struct ccnl_face_s *f)
return f2; return f2;
} }
#if ENABLE_DEBUG
void ccnl_face_print_stat(struct ccnl_face_s *f) void ccnl_face_print_stat(struct ccnl_face_s *f)
{ {
DEBUGMSG(1, "ccnl_face_print_stat: faceid=%d ifndx=%d\n", f->faceid, f->ifndx); DEBUGMSG(1, "ccnl_face_print_stat: faceid=%d ifndx=%d\n", f->faceid, f->ifndx);
@ -551,6 +554,7 @@ void ccnl_face_print_stat(struct ccnl_face_s *f)
DEBUGMSG(1, " STAT content received=%d\n", f->stat.received_content); DEBUGMSG(1, " STAT content received=%d\n", f->stat.received_content);
} }
#endif
void ccnl_interface_cleanup(struct ccnl_if_s *i) void ccnl_interface_cleanup(struct ccnl_if_s *i)
{ {
@ -640,6 +644,9 @@ ccnl_face_dequeue(struct ccnl_relay_s *ccnl, struct ccnl_face_s *f)
void ccnl_face_CTS_done(void *ptr, int cnt, int len) void ccnl_face_CTS_done(void *ptr, int cnt, int len)
{ {
(void) ptr;
(void) cnt;
(void) len;
DEBUGMSG(99, "ccnl_face_CTS_done face=%p cnt=%d len=%d\n", ptr, cnt, len); DEBUGMSG(99, "ccnl_face_CTS_done face=%p cnt=%d len=%d\n", ptr, cnt, len);
} }

View File

@ -160,6 +160,7 @@ static void riot_ccnl_appserver_register(void)
return; return;
} }
int content_len = ccnl_riot_client_publish(relay_pid, prefix, faceid, type, mgnt_pkg); int content_len = ccnl_riot_client_publish(relay_pid, prefix, faceid, type, mgnt_pkg);
(void) content_len;
DEBUG("received %d bytes.\n", content_len); DEBUG("received %d bytes.\n", content_len);
DEBUG("appserver received: '%s'\n", mgnt_pkg); DEBUG("appserver received: '%s'\n", mgnt_pkg);

View File

@ -29,7 +29,7 @@
#include "ccnl-pdu.h" #include "ccnl-pdu.h"
#include "ccnl-riot-compat.h" #include "ccnl-riot-compat.h"
#if MODULE_AT86RF231 || MODULE_CC2420 || MODULE_MC1322X #if defined (MODULE_AT86RF231) || defined(MODULE_CC2420) || defined(MODULE_MC1322X)
ieee802154_packet_t p; ieee802154_packet_t p;
#else #else
radio_packet_t p; radio_packet_t p;

View File

@ -133,7 +133,7 @@
#define CCNL_DTAG_WFRAG_FLAG_FIRST 0x01 #define CCNL_DTAG_WFRAG_FLAG_FIRST 0x01
#define CCNL_DTAG_WFRAG_FLAG_LAST 0x02 #define CCNL_DTAG_WFRAG_FLAG_LAST 0x02
#define ENABLE_DEBUG (1) #define ENABLE_DEBUG (0)
#include "debug.h" #include "debug.h"
// function alias for RIOTs debug infrastructure // function alias for RIOTs debug infrastructure