Commit Graph

9 Commits

Author SHA1 Message Date
Lefteris Chatzimparmpas
3690506986 Ignore errors and retry later when in daemon mode
A persistent failure that could lead to a session not being able to be
recovered, or a failure during the login process (which is not covered
by the recovery function), would normally cause the process to
terminate.  This is expected when the configuration is run once, but not
desirable when running in daemon mode.

And thus just after the process has become a daemon, a session that
could not be restored, either because the connection to the server could
not be established or the login and its related negotiations failed, is
now disabled temporarily, and a recoqnection is attempted at the
beginning of the next daemon loop iteration.

There is one exception to that, and that is when there is an
authentication error, for example when a wrong username or password has
been supplied, and in this case the process terminates and a relevant
error is printed.
2012-02-29 21:01:11 +01:00
Lefteris Chatzimparmpas
239435ba9e Use the same quotation for all the strings. 2012-02-22 18:57:54 +01:00
Lefteris Chatzimparmpas
95ce717bcf Add shortcuts to some possibly useful functions. 2012-02-21 20:13:55 +01:00
Lefteris Chatzimparmpas
51da675056 Don't do a protected call for the daemon commands
The errors produced by the ifcore module methods are important and thus
should not be ignored.
2012-02-21 17:49:38 +01:00
Lefteris Chatzimparmpas
2cafede975 Use session pointer to denote accounts
Instead of the account details, a pointer to the C structure is used in
Lua, stored as light userdata.

The 1.x deprecated configuration format has been removed, partly due to
the above change, and partly because it has been included for long
enough now.
2012-02-14 22:13:15 +01:00
Lefteris Chatzimparmpas
2c70382775 Remove control structures' optional parentheses. 2012-02-11 22:55:03 +01:00
Lefteris Chatzimparmpas
e8b5fdd7d6 Fix become_daemon() call to ifsys.daemon()
Make sure that the two optional arguments of ifsys.daemon() are of type
boolean as expected.
2011-12-08 20:37:26 +01:00
Lefteris Chatzimparmpas
e51afea6eb Correct daemon function and add new options
Correct forking inside the daemon function, correct the error messages
printed, and add two new options for controlling working directory
change and redirection of the standard file descriptors.
2011-07-31 18:03:29 +02:00
Lefteris Chatzimparmpas
4fe1a3d649 Change file and directory structure
Move the source code to the src dir, the man pages to the doc dir, and
the example configuration files to the samples dir, and update all
relevant files to reflect the changes.
2011-03-06 13:34:44 +01:00