From 70a0f9e4a1af6bdc822a00f4d619fc0ccee41ec3 Mon Sep 17 00:00:00 2001 From: gardners Date: Mon, 30 Apr 2012 20:05:40 +0930 Subject: [PATCH] changed client socket path to include both pid and 32-bit random value. clutter should be constrained by the previous addition of socket cleanup code. --- overlay_mdp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/overlay_mdp.c b/overlay_mdp.c index 2f4cfcc9..832a4a75 100644 --- a/overlay_mdp.c +++ b/overlay_mdp.c @@ -1121,9 +1121,9 @@ int overlay_mdp_client_init() name.sun_family = AF_UNIX; if (overlay_mdp_client_socket_path_len==-1) { char fmt[1024]; - if (!FORM_SERVAL_INSTANCE_PATH(fmt, "mdp-client-%d.socket")) + if (!FORM_SERVAL_INSTANCE_PATH(fmt, "mdp-client-%d-%08x.socket")) return WHY("Could not form MDP client socket name"); - snprintf(overlay_mdp_client_socket_path,1024,fmt,getpid()); + snprintf(overlay_mdp_client_socket_path,1024,fmt,getpid(),random_value); overlay_mdp_client_socket_path_len=strlen(overlay_mdp_client_socket_path)+1; WHYF("MDP client socket name='%s'",overlay_mdp_client_socket_path); }