here rework the switch proc_title(), both clang and gcc will now warn if all
possible values are not enumerated.
ok gilles@
-/* $OpenBSD: control.c,v 1.120 2017/11/27 08:35:59 sunil Exp $ */
+/* $OpenBSD: control.c,v 1.121 2018/01/27 08:32:03 anton Exp $ */
/*
* Copyright (c) 2012 Gilles Chehade <gilles@poolp.org>
c->mproc.proc = PROC_CLIENT;
c->mproc.handler = control_dispatch_ext;
c->mproc.data = c;
+ if ((c->mproc.name = strdup(proc_title(c->mproc.proc))) == NULL)
+ fatal("strdup");
mproc_init(&c->mproc, connfd);
mproc_enable(&c->mproc);
tree_xset(&ctl_conns, c->id, c);
-/* $OpenBSD: smtpd.c,v 1.291 2017/11/21 12:20:34 eric Exp $ */
+/* $OpenBSD: smtpd.c,v 1.292 2018/01/27 08:32:03 anton Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
return "pony express";
case PROC_CA:
return "klondike";
- default:
- return "unknown";
+ case PROC_CLIENT:
+ return "client";
}
+ return "unknown";
}
const char *