[sr-dev] git:4.3:2665a0e7: core: print runtime dir in log message

Daniel-Constantin Mierla miconda at gmail.com
Mon Nov 16 12:03:33 CET 2015


Module: kamailio
Branch: 4.3
Commit: 2665a0e7d2a2b3a02cfeb2809ec9dd0d3bafcb25
URL: https://github.com/kamailio/kamailio/commit/2665a0e7d2a2b3a02cfeb2809ec9dd0d3bafcb25

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2015-11-16T12:01:11+01:00

core: print runtime dir in log message

- do logging to syslog, along with stderror for runtime dir related
  errors

(cherry picked from commit 5e9f144ca214f43b2fd01917fb4983716c8916f8)

---

Modified: main.c

---

Diff:  https://github.com/kamailio/kamailio/commit/2665a0e7d2a2b3a02cfeb2809ec9dd0d3bafcb25.diff
Patch: https://github.com/kamailio/kamailio/commit/2665a0e7d2a2b3a02cfeb2809ec9dd0d3bafcb25.patch

---

diff --git a/main.c b/main.c
index acb8ce4..a990cf7 100644
--- a/main.c
+++ b/main.c
@@ -2316,12 +2316,14 @@ 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) {
-			fprintf(stderr,  "failed to create runtime dir\n");
+			LM_ERR("failed to create runtime dir %s\n", runtime_dir);
+			fprintf(stderr,  "failed to create runtime dir %s\n", runtime_dir);
 			goto error;
 		}
 		if(sock_uid!=-1 || sock_gid!=-1) {
 			if(chown(runtime_dir, sock_uid, sock_gid) == -1) {
-				fprintf(stderr,  "failed to change owner of runtime dir\n");
+				LM_ERR("failed to change owner of runtime dir %s\n", runtime_dir);
+				fprintf(stderr,  "failed to change owner of runtime dir %s\n", runtime_dir);
 				goto error;
 			}
 		}




More information about the sr-dev mailing list