[sr-dev] git:master:37ec84b6: Merge branch 'master' of https://github.com/kamailio/kamailio

wkampich wolfgang.kampichler at gmail.com
Fri Sep 6 16:29:24 CEST 2019


Module: kamailio
Branch: master
Commit: 37ec84b6718bf34c325f5cb522f7e41d8d345849
URL: https://github.com/kamailio/kamailio/commit/37ec84b6718bf34c325f5cb522f7e41d8d345849

Author: wkampich <wolfgang.kampichler at gmail.com>
Committer: wkampich <wolfgang.kampichler at gmail.com>
Date: 2019-09-06T16:27:25+02:00

Merge branch 'master' of https://github.com/kamailio/kamailio

---

Modified: src/core/daemonize.c
Modified: src/core/ppcfg.c
Modified: src/main.c

---

Diff:  https://github.com/kamailio/kamailio/commit/37ec84b6718bf34c325f5cb522f7e41d8d345849.diff
Patch: https://github.com/kamailio/kamailio/commit/37ec84b6718bf34c325f5cb522f7e41d8d345849.patch

---

diff --git a/src/core/daemonize.c b/src/core/daemonize.c
index 98bf04dc78..d6692523c7 100644
--- a/src/core/daemonize.c
+++ b/src/core/daemonize.c
@@ -350,14 +350,14 @@ int daemonize(char*  name,  int status_wait)
 		}
 		pid=getpid();
 		if ((pid_stream=fopen(pid_file, "w"))==NULL){
-			LM_WARN("unable to create pid file %s: %s\n",
+			LM_WARN("unable to create pid file %s: %s, check directory permissions\n",
 				pid_file, strerror(errno));
 			goto error;
 		}else{
 			fprintf(pid_stream, "%i\n", (int)pid);
 			fclose(pid_stream);
 			if(chown(pid_file, pid_uid, pid_gid)<0) {
-				LM_ERR("failed to chwon PID file: %s\n", strerror(errno));
+				LM_ERR("failed to chown PID file: %s\n", strerror(errno));
 				goto error;
 			}
 		}
@@ -385,7 +385,7 @@ int daemonize(char*  name,  int status_wait)
 				fprintf(pid_stream, "%i\n", (int)pid);
 				fclose(pid_stream);
 				if(chown(pgid_file, pid_uid, pid_gid)<0) {
-					LM_ERR("failed to chwon PGID file: %s\n", strerror(errno));
+					LM_ERR("failed to chown PGID file: %s\n", strerror(errno));
 					goto error;
 				}
 			}
diff --git a/src/core/ppcfg.c b/src/core/ppcfg.c
index 3b026f9978..49065938af 100644
--- a/src/core/ppcfg.c
+++ b/src/core/ppcfg.c
@@ -219,8 +219,13 @@ void pp_ifdef_level_update(int val)
 void pp_ifdef_level_check(void)
 {
 	if(_pp_ifdef_level!=0) {
-		LM_WARN("different number of preprocessor directives:"
-				" N(#!IF[N]DEF) - N(#!ENDIF) = %d\n", _pp_ifdef_level);
+		if (_pp_ifdef_level > 0) {
+	                LM_WARN("different number of preprocessor directives:"
+				" %d more #!if[n]def as #!endif\n", _pp_ifdef_level);
+		} else {
+			LM_WARN("different number of preprocessor directives:"
+				" %d more #!endif as #!if[n]def\n", (_pp_ifdef_level)*-1);
+		}
 	} else {
 		LM_DBG("same number of pairing preprocessor directives"
 			" #!IF[N]DEF - #!ENDIF\n");
diff --git a/src/main.c b/src/main.c
index 1b7004d8b0..ba64af67db 100644
--- a/src/main.c
+++ b/src/main.c
@@ -2211,7 +2211,8 @@ int main(int argc, char** argv)
 		cfg_stream=fopen (cfg_file, "r");
 	}
 	if (cfg_stream==0){
-		fprintf(stderr, "ERROR: loading config file(%s): %s\n", cfg_file,
+		fprintf(stderr, "ERROR: loading config file(%s): %s,"
+				" check file and directory permissions\n", cfg_file,
 				strerror(errno));
 		goto error;
 	}
@@ -2551,8 +2552,8 @@ int main(int argc, char** argv)
 	/* create runtime dir if doesn't exist */
 	if (stat(runtime_dir, &st) == -1) {
 		if(mkdir(runtime_dir, 0700) == -1) {
-			LM_ERR("failed to create runtime dir %s\n", runtime_dir);
-			fprintf(stderr,  "failed to create runtime dir %s\n", runtime_dir);
+			LM_ERR("failed to create runtime dir %s, check directory permissions\n", runtime_dir);
+			fprintf(stderr, "failed to create runtime dir %s, check directory permissions\n", runtime_dir);
 			goto error;
 		}
 		if(sock_uid!=-1 || sock_gid!=-1) {




More information about the sr-dev mailing list