Module: kamailio
Branch: master
Commit: 5e9f144ca214f43b2fd01917fb4983716c8916f8
URL:
https://github.com/kamailio/kamailio/commit/5e9f144ca214f43b2fd01917fb49837…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)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/5e9f144ca214f43b2fd01917fb49837…
Patch:
https://github.com/kamailio/kamailio/commit/5e9f144ca214f43b2fd01917fb49837…
---
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;
}
}