Skip to content

Commit

Permalink
Updated with fix for common.h. See PR gwAdvNet2015#70
Browse files Browse the repository at this point in the history
  • Loading branch information
amygara committed Apr 29, 2015
1 parent 9d85b31 commit 606c0b4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
16 changes: 14 additions & 2 deletions common.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
/************************************************
* GW KV
* https://github.com/gwAdvNet2015/gw-kv-store
*
* Copyright 2015 Phil Lopreiato, Stephen Monaghan,
* Neel Shah, Eric Armbrust
*
* This program is licensed under the MIT license.
*
* common.h - Used to enable verbose print.
*************************************************/

#ifndef __COMMON_H__
#define __COMMON_H__

volatile int verbose_print = 0;
extern volatile int verbose_print;

#define eprintf(format, ...) do { \
if (verbose_print) \
Expand All @@ -13,4 +25,4 @@ volatile int verbose_print = 0;
printf(format, ##__VA_ARGS__); \
} while(0)

#endif
#endif /* __COMMON_H__ */
3 changes: 2 additions & 1 deletion lib/marshal/marshal.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/*
* @desc: The function does the marshing. Function does all the allocation.
* It is caller's responsibility to free the memory allocated.
Expand All @@ -12,6 +11,8 @@
#include "marshal.h"
#include "../../common.h"

volatile int verbose_print = 0;

int
gwkv_marshal_server(struct operation* data, int status, char** ascii)
{
Expand Down

0 comments on commit 606c0b4

Please sign in to comment.