diff mbox series

[v2,3/6] socket split: adapt remote handler

Message ID 20170907122454.24183-3-christian.storm@siemens.com
State Accepted
Headers show
Series None | expand

Commit Message

Storm, Christian Sept. 7, 2017, 12:24 p.m. UTC
Make the solely internally used handlers/remote_handler.c
use the kconfig setting for SOCKET_REMOTE_HANDLER_DIRECTORY.
As TMPDIR is hard-coded to /tmp, this change maintains
backwards compatibility.

Signed-off-by: Christian Storm <christian.storm@siemens.com>
---
 handlers/remote_handler.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/handlers/remote_handler.c b/handlers/remote_handler.c
index 663a451..59661c0 100644
--- a/handlers/remote_handler.c
+++ b/handlers/remote_handler.c
@@ -167,7 +167,7 @@  static int install_remote_image(struct img_type *img,
 	struct RHmsg RHmessage;
 	char bufcmd[80];
 
-	len = strlen(img->type_data) + strlen(TMPDIR) + strlen("ipc://") + 4;
+	len = strlen(img->type_data) + strlen(CONFIG_SOCKET_REMOTE_HANDLER_DIRECTORY) + strlen("ipc://") + 4;
 
 	/*
 	 * Allocate maximum string
@@ -177,7 +177,7 @@  static int install_remote_image(struct img_type *img,
 		ERROR("Not enough memory");
 		return -ENOMEM;
 	}
-	snprintf(connect_string, len, "ipc://%s%s", TMPDIR,
+	snprintf(connect_string, len, "ipc://%s%s", CONFIG_SOCKET_REMOTE_HANDLER_DIRECTORY,
 			img->type_data);
 
 	ret = zmq_connect(request, connect_string);