X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=src%2Fmail-smtp.c;h=b1b50955dc294296327b801b51b2ac4178e3ae6c;hb=HEAD;hp=85b68d9f2be9b53147e637b502f046deb4fd4250;hpb=022bd2b4a123c7860a7c9529e253c569c1613933;p=srvx.git diff --git a/src/mail-smtp.c b/src/mail-smtp.c index 85b68d9..b1b5095 100644 --- a/src/mail-smtp.c +++ b/src/mail-smtp.c @@ -79,7 +79,7 @@ static struct { int enabled; } smtp_conf; -DEFINE_LIST(mail_queue, struct pending_mail *); +DEFINE_LIST(mail_queue, struct pending_mail *) static void mail_println(const char *fmt, ...) { @@ -138,7 +138,7 @@ static void smtp_fill_name(char *namebuf, size_t buflen) } res = getnameinfo(sa, sa_len, namebuf, buflen, NULL, 0, NI_NUMERICHOST); if (res != 0) { - log_module(MAIL_LOG, LOG_ERROR, "Unable to get text form of socket name: %s", strerror(errno)); + log_module(MAIL_LOG, LOG_ERROR, "Unable to get text form of socket name: %s", gai_strerror(res)); } } @@ -383,6 +383,7 @@ static void mail_destroyed(struct io_fd *fd) assert(smtp_fd == fd); smtp_state = CLOSED; smtp_fd = NULL; + (void)fd; /* in case NDEBUG causes assert() to be empty */ } static void mail_connected(struct io_fd *fd, int error)