bytes_read = recv(strokefd, msg, msg_length, 0);
if (bytes_read != msg_length)
{
- DBG1(DBG_CFG, "reading stroke message failed: %m");
+ DBG1(DBG_CFG, "reading stroke message failed: %s", strerror(errno));
close(strokefd);
return;
}
out = fdopen(dup(strokefd), "w");
if (out == NULL)
{
- DBG1(DBG_CFG, "opening stroke output channel failed: %m");
+ DBG1(DBG_CFG, "opening stroke output channel failed: %s", strerror(errno));
close(strokefd);
free(msg);
return;
if (strokefd < 0)
{
- DBG1(DBG_CFG, "accepting stroke connection failed: %m");
+ DBG1(DBG_CFG, "accepting stroke connection failed: %s", strerror(errno));
continue;
}
stroke_process(this, strokefd);
old = umask(~S_IRWXU);
if (bind(this->socket, (struct sockaddr *)&socket_addr, sizeof(socket_addr)) < 0)
{
- DBG1(DBG_CFG, "could not bind stroke socket: %m");
+ DBG1(DBG_CFG, "could not bind stroke socket: %s", strerror(errno));
close(this->socket);
free(this);
return NULL;
if (listen(this->socket, 0) < 0)
{
- DBG1(DBG_CFG, "could not listen on stroke socket: %m");
+ DBG1(DBG_CFG, "could not listen on stroke socket: %s", strerror(errno));
close(this->socket);
unlink(socket_addr.sun_path);
free(this);