diff --git a/common.h b/common.h index 41bda87..571e776 100644 --- a/common.h +++ b/common.h @@ -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) \ @@ -13,4 +25,4 @@ volatile int verbose_print = 0; printf(format, ##__VA_ARGS__); \ } while(0) -#endif +#endif /* __COMMON_H__ */ diff --git a/lib/marshal/marshal.c b/lib/marshal/marshal.c index 7508a98..4d287c3 100644 --- a/lib/marshal/marshal.c +++ b/lib/marshal/marshal.c @@ -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. @@ -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) {