From 7192018f97f6406ccc6711fc5d76cea63ec080ec Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Bollo?= Date: Thu, 17 Mar 2016 11:29:30 +0100 Subject: [PATCH] local-def: dispatch some definitions MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit local-def.h contains too many things. This commit is a little step for cleaning it. Change-Id: I487860f9f56adbd40cae12a3b19930bbb31c67bc Signed-off-by: José Bollo --- include/local-def.h | 4 ---- src/http-svc.c | 2 ++ src/main.c | 4 +++- 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 #include +#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"); -- 2.16.6