Use /var/run/minissdpd.sock as default socketpath in connectToMiniSSDPD().

This commit is contained in:
Konstantin Tokarev 2015-07-23 16:22:54 +03:00
parent cffba15387
commit f29b026f38
1 changed files with 2 additions and 0 deletions

View File

@ -137,6 +137,8 @@ connectToMiniSSDPD(const char * socketpath)
perror("setsockopt");
}
#endif /* #ifdef MINIUPNPC_SET_SOCKET_TIMEOUT */
if(!socketpath)
socketpath = "/var/run/minissdpd.sock";
addr.sun_family = AF_UNIX;
strncpy(addr.sun_path, socketpath, sizeof(addr.sun_path));
/* TODO : check if we need to handle the EINTR */