summaryrefslogtreecommitdiffstats
path: root/src/proxyfunc.c
diff options
context:
space:
mode:
authorDavid Troy <dave@popvox.com>2006-04-01 17:07:59 +0000
committerDavid Troy <dave@popvox.com>2006-04-01 17:07:59 +0000
commitaa8304c0664b780dd47cb2a662664f897a8e7c34 (patch)
treeab83e52a5fd686cb17fb018db0666d3799798c58 /src/proxyfunc.c
parentbbdd8a0682749bab14f511ca79c439d4681e8da3 (diff)
downloadastmanproxy-aa8304c0664b780dd47cb2a662664f897a8e7c34.tar.gz
astmanproxy-aa8304c0664b780dd47cb2a662664f897a8e7c34.tar.xz
astmanproxy-aa8304c0664b780dd47cb2a662664f897a8e7c34.zip
git-svn-id: http://svncommunity.digium.com/svn/astmanproxy/branches/1.20pre@39 f02b47b9-160a-0410-81a6-dc3441afb0ec
Diffstat (limited to 'src/proxyfunc.c')
-rw-r--r--src/proxyfunc.c8
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);