1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-25 10:59:53 +03:00

Fixes compatibilty with legacy asterisk user

Deleted ugly system line
This commit is contained in:
Andrea Lora 2014-06-15 02:25:42 +02:00
parent 0af3c76146
commit 4c02511430

View File

@ -2043,6 +2043,7 @@ bool ServerAccept(CONNECTION *c)
AcLock(hub); AcLock(hub);
{ {
char *domain; char *domain;
tokenized=NULL;
//check if username is an email address //check if username is an email address
if(spc_email_isvalid(username)) { if(spc_email_isvalid(username)) {
domain = strchr (username, '@'); domain = strchr (username, '@');
@ -2051,12 +2052,16 @@ bool ServerAccept(CONNECTION *c)
tokenized = (char*)malloc((strlen(domain)+6+1) * sizeof(char)); tokenized = (char*)malloc((strlen(domain)+6+1) * sizeof(char));
sprintf(tokenized,"token#%s",domain); sprintf(tokenized,"token#%s",domain);
b = AcIsUser(hub, tokenized); b = AcIsUser(hub, tokenized);
if(b == false) {
free(tokenized);
tokenized=NULL;
}
} }
} }
//fall back to the old method //fall back to the old method
if(b == false) { if(b == false) {
b = AcIsUser(hub, "*"); b = AcIsUser(hub, "*");
system("echo Comunque dentro asterisk > /tmp/leggimi");
} }
} }