mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-01-31 00:23:50 +00:00
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:
parent
c041048958
commit
41a7588a7f
@ -89,7 +89,7 @@ int monitor_setup_sockets()
|
|||||||
/* Doesn't include trailing nul */
|
/* Doesn't include trailing nul */
|
||||||
len = 1+strlen(&name.sun_path[1]) + sizeof(name.sun_family);
|
len = 1+strlen(&name.sun_path[1]) + sizeof(name.sun_family);
|
||||||
#else
|
#else
|
||||||
snprintf(name.sun_path,104-1,"%s/",
|
snprintf(name.sun_path,104-1,"%s/%s",
|
||||||
serval_instancepath(),
|
serval_instancepath(),
|
||||||
confValueGet("monitor.socket",DEFAULT_MONITOR_SOCKET_NAME));
|
confValueGet("monitor.socket",DEFAULT_MONITOR_SOCKET_NAME));
|
||||||
unlink(name.sun_path);
|
unlink(name.sun_path);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user