aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2016-03-17 11:29:30 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2016-03-17 11:36:44 +0100
commit7192018f97f6406ccc6711fc5d76cea63ec080ec (patch)
tree277ecb654b5f67d519d81c315af22853115e5512
parentc2560bd51498fb38e645b60ae638e2e888c74b65 (diff)
local-def: dispatch some definitions
local-def.h contains too many things. This commit is a little step for cleaning it. Change-Id: I487860f9f56adbd40cae12a3b19930bbb31c67bc Signed-off-by: José Bollo <jose.bollo@iot.bzh>
-rw-r--r--include/local-def.h4
-rw-r--r--src/http-svc.c2
-rw-r--r--src/main.c4
3 files changed, 5 insertions, 5 deletions
diff --git a/include/local-def.h b/include/local-def.h
index 2deb8c04..c87fb508 100644
--- a/include/local-def.h
+++ b/include/local-def.h
@@ -45,13 +45,9 @@
-
-#define AJQ_VERSION "0.1"
-
/* other definitions --------------------------------------------------- */
// Note: because of a bug in libmagic MAGIC_DB NULL should not be used for default
-#define MAGIC_DB "/usr/share/misc/magic.mgc"
#define OPA_INDEX "index.html"
#define MAX_ALIAS 10 // max number of aliases
#define COOKIE_NAME "afb-session"
diff --git a/src/http-svc.c b/src/http-svc.c
index 71e0a08f..3dcd2f5d 100644
--- a/src/http-svc.c
+++ b/src/http-svc.c
@@ -42,6 +42,8 @@ static size_t apiUrlLen=0;
static size_t baseUrlLen=0;
static size_t rootUrlLen=0;
+#define MAGIC_DB "/usr/share/misc/magic.mgc"
+
// try to open libmagic to handle mime types
static AFB_error initLibMagic (AFB_session *session) {
diff --git a/src/main.c b/src/main.c
index 800e8d1d..9769f526 100644
--- a/src/main.c
+++ b/src/main.c
@@ -31,6 +31,8 @@
#include <getopt.h>
#include <pwd.h>
+#define AFB_VERSION "0.1"
+
static sigjmp_buf exitPoint; // context save for set/longjmp
/*----------------------------------------------------------
@@ -40,7 +42,7 @@ static sigjmp_buf exitPoint; // context save for set/longjmp
static void printVersion (void) {
fprintf (stderr,"\n----------------------------------------- \n");
- fprintf (stderr,"| AFB [Application Framework Binder] version=%s |\n", AJQ_VERSION);
+ fprintf (stderr,"| AFB [Application Framework Binder] version=%s |\n", AFB_VERSION);
fprintf (stderr,"----------------------------------------- \n");
fprintf (stderr,"| Copyright(C) 2015 Fulup Ar Foll /IoT.bzh [fulup -at- iot.bzh]\n");
fprintf (stderr,"| AFB comes with ABSOLUTELY NO WARRANTY.\n");