-
- Downloads
More cleanup of check_user_full with no functional change
apart from a small (but disabled by default) new option. In detail: + introduce a new value for enum check_auth_result, AUTH_DONT_KNOW, used (read below) when a function does not have a conclusive response. Possibly this is the same as AUTH_NOT_FOUND, but need to check further. + move the large blocks (checking in the users list and in the peers list, respectively) from check_user_full() to separate functions. They return AUTH_DONT_KNOW in case they don't find a match, so the caller know that it has to try the next method. There is still some duplication of code here, but i have not tried yet to remove it. + [new option] a new option in sip.conf, match_auth_username, has been introduced, and disabled by default. If set, and the incoming request carries authentication info, the username to match in the users list is taken from there rather than from the From: field. This change is easy to identify, being made of - one line to declare the variable match_auth_username - a block of 15 lines in check_user_full() - one line in sip list settings - two lines for parsing the config file. check_user_full() is now a lot cleaner - basically a sequence of checks that are applied to the request. This will help future work with new matching schemes. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45945 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Loading
Please register or sign in to comment