local-def: dispatch some definitions
authorJosé Bollo <jose.bollo@iot.bzh>
Thu, 17 Mar 2016 10:29:30 +0000 (11:29 +0100)
committerJosé Bollo <jose.bollo@iot.bzh>
Thu, 17 Mar 2016 10:36:44 +0000 (11:36 +0100)
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>
include/local-def.h
src/http-svc.c
src/main.c

index 2deb8c0..c87fb50 100644 (file)
 
 
 
-
-#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"
index 71e0a08..3dcd2f5 100644 (file)
@@ -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) {
   
index 800e8d1..9769f52 100644 (file)
@@ -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");