Another roll at fixing the voucher sync problems.
Fix php behaviour on xmlrpc sync and vouchers starting with a number. Apparently php uses that to deduce the type of var and gets confused.
If vouchers are disabled do not allow users to authenticate thorugh existing(active/in use) vouchers. Reported-by: http://forum.pfsense.org/index.php/topic,38342.0.html
Fixes #1327. Trigger synching of vouchers to config through check_reload_status. Retire the saveinterval option since it is not useful anymore. Use the prune process of captiveportal to sync vouchers as well to fix issues as reported-by: http://forum.pfsense.org/index.php/topic,37636.0.html
Disconnect any voucher forced to expire if there are active sessions with it.
Provide a voucher_expire function so that voucher can be expired through a POST.
Update some code to be more readble and more compliant to php5
Test for array before using variable as one.
Make the return values on error consistent with the normal return value.
Actually correctly report the timeleft in log messages. This is mostly cosmetic.
Correctly synchronize the db of vouchers from master. Also correctly write it to the files since before it is only allowed during bootup and not from xmlrpc.
Correct log messages to not display port twice.
Fix voucher disconnect sync issue
Do a proper test otherwise a override of the total_minutes var might happen.
Properly do testing of voucher existing or not rather than relying on an obscure feature of php. Also do exclusive locking rather than shared one when writing dbs.
Include captiveportal.inc if captiveportal_syslog() is not defined.
Use captiveportal_syslog()
White space fixes and (C) for both Ermal and myself
Log voucher errors. Fix whitespace. Remove trailing c/r
Safe belts to avoid errors.
Fix condition that needed to be negated after a recent layout change here and prevent a PHP warning if there are no voucher rolls. Fixes #1106
Make voucher xmlrpc error checking the same as others.
Ticket #1087. Cleanup whitespace and also do not rely on having the db dirty flag set for backing up the dbs but always do this!
Cleanup of whitespace and use exclusive lock during reconfiguration of vouchers.
Check for less time available on remote node
Only make one XMLRPC call
Sync rolls if needed. This might be required if the operator removed/added or changed the rolls on the master node
Add Captive Portal voucher database sync to secondary nodes. How this works is you designate one of your access points with a voucher database as the master and then on the slave nodes you setup the 4 fields on the voucher edit screen. This will then sync the voucher database and anytime someone attempts to authenticate the slave nodes will use XMLRPC over to the master node to ensure that the voucher has not been used, etc....
Resolve issue where used variable might be an array (multiple voucher rolls)
nuke trailing c/r
Ticket #351. Prevent wrong config.xml creation.
Ticket #350. Correct calculation to be the same as in the voucher_auth.
Rework includes/require. This saves about 4 megabytes.Simplify get_memory(). Tested on mips/i386
Fix Bug #147.
yes, I'll even fix typos in comments
Add pfSense_BUILDER_BINARIES: and pfSense_MODULE: additions
Convert even voucher to the new subsystem_dirty functions. This reduces another global.
Fix various issues reported on http://forum.pfsense.org/index.php/topic,8672.0.html.
Port voucher login ability on CaptivePortal from M0n0Wall.
Various locking fixes are done with the import and this means that as of now pfSense has a better performin/behaving CP than m0n0wall.