Fix creation of socket name for !linux. Depressingly bind() doesn't fail when you pass it the name of a directory.

This commit is contained in:
Daniel O'Connor 2012-06-22 19:34:01 +09:30
parent c041048958
commit 41a7588a7f

View File

@ -89,7 +89,7 @@ int monitor_setup_sockets()
/* Doesn't include trailing nul */
len = 1+strlen(&name.sun_path[1]) + sizeof(name.sun_family);
#else
snprintf(name.sun_path,104-1,"%s/",
snprintf(name.sun_path,104-1,"%s/%s",
serval_instancepath(),
confValueGet("monitor.socket",DEFAULT_MONITOR_SOCKET_NAME));
unlink(name.sun_path);