Message handlers should return void.
Also fix up some return values and stuff to use bool (or void if nothing). I just did it whilst I was here. According to jilles, the return value used to signify whether or not the client had exited. This was error-prone and was fixed a long, long time ago, but the return value was left int for historical reasons. Since the return type is not used (and has no clear use case anyway), it's safe to just get rid of it.
This commit is contained in:
parent
eeabf33a7c
commit
3c7d6fcce7
99 changed files with 1339 additions and 1691 deletions
|
@ -36,7 +36,7 @@
|
|||
static const char post_desc[] =
|
||||
"Ensure Web forms/proxies cannot connect by disconnecting on POST, GET, and PUT";
|
||||
|
||||
static int mr_dumb_proxy(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
|
||||
static void mr_dumb_proxy(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
|
||||
|
||||
struct Message post_msgtab = {
|
||||
"POST", 0, 0, 0, 0,
|
||||
|
@ -54,17 +54,15 @@ struct Message put_msgtab = {
|
|||
mapi_clist_av1 post_clist[] = {
|
||||
&post_msgtab, &get_msgtab, &put_msgtab, NULL
|
||||
};
|
||||
DECLARE_MODULE_AV2(post, NULL, NULL, post_clist, NULL, NULL, NULL, NULL, post_desc);
|
||||
|
||||
DECLARE_MODULE_AV2(post, NULL, NULL, post_clist, NULL, NULL, NULL, NULL, post_desc);
|
||||
|
||||
/*
|
||||
** mr_dumb_proxy
|
||||
** parv[1] = comment
|
||||
*/
|
||||
static int
|
||||
static void
|
||||
mr_dumb_proxy(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
|
||||
{
|
||||
exit_client(client_p, source_p, source_p, "Client Exit");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue