Quellcode durchsuchen

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

wkampich vor 6 Jahren
Ursprung
Commit
37ec84b671
3 geänderte Dateien mit 14 neuen und 8 gelöschten Zeilen
  1. 3 3
      src/core/daemonize.c
  2. 7 2
      src/core/ppcfg.c
  3. 4 3
      src/main.c

+ 3 - 3
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;
 				}
 			}

+ 7 - 2
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");

+ 4 - 3
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 @@ try_again:
 	/* 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) {