error codes fixed
This commit is contained in:
parent
a70f1f9e23
commit
aab8215a4d
@ -3,6 +3,9 @@ Version 4.0.1.3 'Severard':
|
||||
- Logfile reset on SIGHUP
|
||||
(Gustavo Garcia suggestion).
|
||||
- Log reset CLi command.
|
||||
- Some error code corrections:
|
||||
* "Mobility forbidden" error changed, to value 405.
|
||||
* "Wrong credentials" situation is now treated as error 441.
|
||||
|
||||
06/06/2014 Oleg Moskalenko <mom040267@gmail.com>
|
||||
Version 4.0.1.2 'Severard':
|
||||
|
||||
@ -927,7 +927,7 @@ static int handle_turn_allocate(turn_turnserver *server,
|
||||
break;
|
||||
case STUN_ATTRIBUTE_MOBILITY_TICKET:
|
||||
if(!(*(server->mobility))) {
|
||||
*err_code = 501;
|
||||
*err_code = 405;
|
||||
*reason = (const u08bits *)"Mobility Forbidden";
|
||||
} else if (stun_attr_get_len(sar) != 0) {
|
||||
*err_code = 400;
|
||||
@ -1211,7 +1211,7 @@ static int handle_turn_refresh(turn_turnserver *server,
|
||||
SKIP_ATTRIBUTES;
|
||||
case STUN_ATTRIBUTE_MOBILITY_TICKET: {
|
||||
if(!(*(server->mobility))) {
|
||||
*err_code = 501;
|
||||
*err_code = 405;
|
||||
*reason = (const u08bits *)"Mobility forbidden";
|
||||
} if(is_allocation_valid(a)) {
|
||||
*err_code = 400;
|
||||
@ -3012,8 +3012,8 @@ static int check_stun_auth(turn_turnserver *server,
|
||||
|
||||
if(ss->username[0]) {
|
||||
if(strcmp((char*)ss->username,(char*)usname)) {
|
||||
*err_code = 401;
|
||||
*reason = (const u08bits*)"Wrong username";
|
||||
*err_code = 441;
|
||||
*reason = (const u08bits*)"Wrong credentials";
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user