diff options
Diffstat (limited to 'src/proxyfunc.c')
-rw-r--r-- | src/proxyfunc.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/proxyfunc.c b/src/proxyfunc.c index 51ed5c6..99d6dbc 100644 --- a/src/proxyfunc.c +++ b/src/proxyfunc.c @@ -115,9 +115,7 @@ void *ProxyLogin(struct mansession *s, char *user, char *secret) { pthread_mutex_unlock(&userslock); if( !pu ) { - AddHeader(&m, "Response: Error"); - AddHeader(&m, "Message: Authentication failed"); - s->output->write(s, &m); + SendError(s, "Authentication failed"); s->authenticated = 0; if( debug ) debugmsg("Login failed as: %s/%s", user, secret); @@ -322,12 +320,12 @@ int ValidateAction(struct message *m, struct mansession *s, int inbound) { return 1; } -void *SendError(struct mansession *s) { +void *SendError(struct mansession *s, char *errmsg) { struct message m; memset(&m, 0, sizeof(struct message)); AddHeader(&m, "Response: Error"); - AddHeader(&m, "Message: Action Filtered"); + AddHeader(&m, "Message: %s", errmsg); s->output->write(s, &m); |