| | 49 | //product.c module vars for deployment |
| | 50 | extern unsigned uProduct; |
| | 51 | extern unsigned uServices[]; |
| | 52 | extern char cParameterInput[][100]; //tClientConfig.cValue |
| | 53 | extern char cParameterName[][100]; //tParameter.cParameter |
| | 54 | extern unsigned uParameterCount; |
| | 55 | extern unsigned uServicesCount; |
| | 56 | extern unsigned uServiceStartPoint[]; |
| | 57 | extern unsigned uServiceEndPoint[]; |
| | 58 | void DeployProduct(void); |
| | 410 | void DeployRadius(void) |
| | 411 | { |
| | 412 | MYSQL_RES *res; |
| | 413 | MYSQL_ROW field; |
| | 414 | |
| | 415 | //Initialize known values |
| | 416 | uProduct=1; |
| | 417 | uServices[0]=1; |
| | 418 | uServiceStartPoint[0]=0; |
| | 419 | uServiceEndPoint[0]=4; |
| | 420 | sprintf(cParameterName[0],"unxsRadius.Login"); |
| | 421 | sprintf(cParameterName[1],"unxsRadius.ClearText"); |
| | 422 | sprintf(cParameterName[2],"unxsRadius.Passwd"); |
| | 423 | sprintf(cParameterName[3],"unxsRadius.Profile"); |
| | 424 | |
| | 425 | //Set radius account parameters |
| | 426 | sprintf(gcQuery,"SELECT cLabel,cClrPasswd FROM tAuthorize WHERE uCertClient=%u",guLoginClient); |
| | 427 | mysql_query(&gMysql,gcQuery); |
| | 428 | if(mysql_errno(&gMysql)) |
| | 429 | htmlPlainTextError(mysql_error(&gMysql)); |
| | 430 | res=mysql_store_result(&gMysql); |
| | 431 | if((field=mysql_fetch_row(res))) |
| | 432 | { |
| | 433 | sprintf(cParameterInput[0],"%s",field[0]); |
| | 434 | sprintf(cParameterInput[1],"Yes"); |
| | 435 | sprintf(cParameterInput[2],"%s",field[1]); |
| | 436 | sprintf(cParameterInput[3],"Unlimited"); |
| | 437 | } |
| | 438 | else |
| | 439 | htmlPlainTextError("Unexpected condition. Contact support. DeployRadius() error"); |
| | 440 | |
| | 441 | uParameterCount=4; |
| | 442 | uServicesCount=1; |
| | 443 | |
| | 444 | //Commit |
| | 445 | DeployProduct(); |
| | 446 | |
| | 447 | }//void DeployRadius(void) |
| | 448 | |