You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by orpiske <gi...@git.apache.org> on 2018/03/09 15:36:07 UTC
[GitHub] qpid-dispatch pull request #267: DISPATCH-154 - Added unit test
Github user orpiske commented on a diff in the pull request:
https://github.com/apache/qpid-dispatch/pull/267#discussion_r173482946
--- Diff: router/src/main.c ---
@@ -176,6 +176,46 @@ static void daemon_process(const char *config_path, const char *python_pkgdir,
//
umask(0);
+
+ //
+ // If config path is not represented by its full path, then
+ // save current path before changing to /
+ //
+ char *config_path_full = NULL;
+ if (strncmp("/", config_path, 1)) {
+ char *cur_path = NULL;
+ int path_size = 256;
+ int getcwd_error = 0;
+
+ cur_path = (char *) malloc(path_size * sizeof(char));
+ memset(cur_path, 0, path_size * sizeof(char));
+
--- End diff --
I'd probably replace these w/ calloc, since the general behavior should be the same as per calloc spec.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org