[sr-dev] git:master:5e9f144c: core: print runtime dir in log message
Daniel-Constantin Mierla
miconda at gmail.com
Mon Nov 16 11:45:13 CET 2015
Module: kamailio
Branch: master
Commit: 5e9f144ca214f43b2fd01917fb4983716c8916f8
URL: https://github.com/kamailio/kamailio/commit/5e9f144ca214f43b2fd01917fb4983716c8916f8
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2015-11-16T11:43:53+01:00
core: print runtime dir in log message
- do logging to syslog, along with stderror for runtime dir related
errors
---
Modified: main.c
---
Diff: https://github.com/kamailio/kamailio/commit/5e9f144ca214f43b2fd01917fb4983716c8916f8.diff
Patch: https://github.com/kamailio/kamailio/commit/5e9f144ca214f43b2fd01917fb4983716c8916f8.patch
---
diff --git a/main.c b/main.c
index a4407fa..c9a6a12 100644
--- a/main.c
+++ b/main.c
@@ -2358,12 +2358,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