From 67f8a597480e9951ea40e84997011660d09eeb84 Mon Sep 17 00:00:00 2001
From: Guo Wenxue <guowenxue@gmail.com>
Date: Tue, 20 Nov 2018 14:22:19 +0800
Subject: [PATCH] update iotd program makefile remove install and update configure log file to iotd.log

---
 src/nbiotd/iotd.c        |    9 ++++-----
 src/nbiotd/makefile      |    2 +-
 src/nbiotd/etc/iotd.conf |    2 +-
 3 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/nbiotd/etc/iotd.conf b/src/nbiotd/etc/iotd.conf
index c79be71..243987c 100644
--- a/src/nbiotd/etc/iotd.conf
+++ b/src/nbiotd/etc/iotd.conf
@@ -1,6 +1,6 @@
 # uited program configure file
 [log]
-file=/tmp/nbiotd.log
+file=/tmp/iotd.log
 
 #Loglevel: 0:Disable 1:Fatal 2:ERROR 3:warnning 4:Normal 5:Debug 6:Infor 7:Trace
 level=5
diff --git a/src/nbiotd/iotd.c b/src/nbiotd/iotd.c
index 977b0e0..1656ae1 100644
--- a/src/nbiotd/iotd.c
+++ b/src/nbiotd/iotd.c
@@ -68,12 +68,12 @@
     const char           *progname=NULL;
 
     char                  pid_file[64] = { 0 }; /*  The file used to record the PID */
-    char                 *conf_file = "iotd.conf";
+    char                 *conf_file = "etc/iotd.conf";
     char                 *log_file = DEF_LOG_FILE;
     int                   log_level = DEF_LOG_LEVEL;
     iotd_ctx_t            iotd_ctx;
 
-    pthread_t             tid;
+//    pthread_t             tid;
     iotd_conf_t          *conf; 
     logger_t             *logger;
 
@@ -160,7 +160,6 @@
             printf("Logger reopen failure with file: %s\n", logger->file);
             return -1;
         }
-        printf("Open logger ok\n");
     }
 
     if( !debug )
@@ -175,7 +174,7 @@
     cp_install_proc_signal();
 
     /* start watchdog thread worker  */
-    thread_start(&tid, watchdog_worker, NULL);
+    //thread_start(&tid, watchdog_worker, NULL);
 
     /* Start MQTT thread worker */
     if( conf->mqtt_conf.enable )
@@ -243,7 +242,7 @@
     }
 
     close(wtd_fd);
-    printf("watchdog thread worker exit\n");
+    log_warn("watchdog thread worker exit\n");
 
     return NULL;
 }
diff --git a/src/nbiotd/makefile b/src/nbiotd/makefile
index e6ded50..ad06555 100644
--- a/src/nbiotd/makefile
+++ b/src/nbiotd/makefile
@@ -107,7 +107,7 @@
 
 .PHONY: all
 
-all: entry prepare binary install
+all: entry prepare binary 
 
 prepare:
 	@if [ ! -L cp_library  ] ; then \

--
Gitblit v1.9.1