HttpdOutputPlugin.cxx: fix null pointer dereference

This commit is contained in:
Denis Krjuchkov 2013-11-26 18:13:23 +06:00
parent 957d187ae4
commit 22fb49fa90

View File

@ -201,7 +201,8 @@ HttpdOutput::OnAccept(int fd, const sockaddr &address,
if (address.sa_family != AF_UNIX) { if (address.sa_family != AF_UNIX) {
char *hostaddr = sockaddr_to_string(&address, address_length, char *hostaddr = sockaddr_to_string(&address, address_length,
IgnoreError()); IgnoreError());
const char *progname = g_get_prgname(); // TODO: shall we obtain the program name from argv[0]?
const char *progname = "mpd";
struct request_info req; struct request_info req;
request_init(&req, RQ_FILE, fd, RQ_DAEMON, progname, 0); request_init(&req, RQ_FILE, fd, RQ_DAEMON, progname, 0);