reduce messages sent by main to sec-mod

This commit is contained in:
Nikos Mavrogiannopoulos
2015-03-26 07:48:02 +01:00
parent bb5500854d
commit 4a40ec6afa
2 changed files with 6 additions and 2 deletions

View File

@@ -126,8 +126,9 @@ int handle_sec_mod_commands(main_server_st * s)
reply.reply =
AUTH__REP__FAILED;
} else {
reply.reply =
AUTH__REP__OK;
/* no need to send a reply at all */
ret = 0;
goto cleanup;
}
reply.sid.data = tmsg->sid.data;

View File

@@ -321,6 +321,9 @@ int handle_sec_auth_res(int cfd, sec_mod_st * sec, client_entry_st * e, int resu
}
return 0; /* wait for another command */
} else if (result == 0 && e->status != PS_AUTH_FAILED) {
/* we check status for PS_AUTH_FAILED, because status may
* change async if we receive a message from main that the
* user is banned */
e->status = PS_AUTH_COMPLETED;
if (e->module) {