cryptoworks: Add check for READER_CRYPTOWORKS.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8291 4b0bc96b-bc66-0410-9d44-ebda105a78c1
Move global variable definitions closer to where they are used.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8292 4b0bc96b-bc66-0410-9d44-ebda105a78c1
Add get_config_filename() function.

Use this function when we need to create full path to file that
should be in the config directory.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8293 4b0bc96b-bc66-0410-9d44-ebda105a78c1
Fix two harmless warnings.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8294 4b0bc96b-bc66-0410-9d44-ebda105a78c1
webif: Replace copy+pasted code in FILES page.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8295 4b0bc96b-bc66-0410-9d44-ebda105a78c1
webif: Simplify FILES processing.

The previous commit was a little bit over designed, simplify
the code a bit.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8296 4b0bc96b-bc66-0410-9d44-ebda105a78c1
Use more descriptive thread names for worker threads.

In normal operation oscam uses a lot of work_threads. This
commit gives them descriptive names. Previously all threads
were called work_thread.

Unfortunately the thread name can not exceed 16 characters,
so we can not be very descriptive.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8297 4b0bc96b-bc66-0410-9d44-ebda105a78c1
Implement better naming scheme for work threads.

This commit changes the way work threads are named. Work thread name
now contains indication whather the action is reader or client related,
the action code and the reader label or client username.

{{{
Thread name:
  w[r|c]XX-[rdr->label|client->username]

Fields:
   w      - work thread prefix
   [r|c]  - depending whether the the action is related to reader or client
   XX     - two digit action code from enum actions
   label  - reader label or client username (see username() function)
}}}

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8298 4b0bc96b-bc66-0410-9d44-ebda105a78c1
Update work thread names as we run other jobs from the list.

Thanks to Admin for pointing out that work_thread can execute more
than one job.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8299 4b0bc96b-bc66-0410-9d44-ebda105a78c1
griffin: Implement better ATR checking.

Previous checks were wrong and they worked only by chance.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8300 4b0bc96b-bc66-0410-9d44-ebda105a78c1
Update for 'logduplicatelines' documentation.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8301 4b0bc96b-bc66-0410-9d44-ebda105a78c1
doc: Try to make description of "logduplicatelines" less confusing.

As the variable name says "logduplicatelines" enables logging
of duplicate lines in the log when this variable is set to 1.

By default the variable is set to 0 - duplicate lines are
not logged.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8302 4b0bc96b-bc66-0410-9d44-ebda105a78c1
monitor: Do not look for monitor clients when monitor is not compiled in.

write_to_log() tries to find monitor clients even if monitor module
is not compiled in. There is no need to do that.

Patch by malakudi posted in ticket #3137.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8303 4b0bc96b-bc66-0410-9d44-ebda105a78c1
Some cleanups regarding signal handling and shutdown.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8304 4b0bc96b-bc66-0410-9d44-ebda105a78c1
Fix killing of OSCam when it is hanging on binding to ports.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8305 4b0bc96b-bc66-0410-9d44-ebda105a78c1
Fix a small warning that reared its head after signal cleanups.

Fixes ticket #3141.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8306 4b0bc96b-bc66-0410-9d44-ebda105a78c1
Add support for DGCrypt CAS.

Release early, release often. The reader should be working although
there maybe some issues with csctapi protocol handling. These can
be worked out once enough people start testing the code.

Thanks to Bruty 12 for the code and testing.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8307 4b0bc96b-bc66-0410-9d44-ebda105a78c1
Fix removing of oscam.version.

Always delete oscam.version file on exit.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8308 4b0bc96b-bc66-0410-9d44-ebda105a78c1
Introduce get_tmp_dir_filename() function.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8309 4b0bc96b-bc66-0410-9d44-ebda105a78c1
Move all cleanup function calls in main().

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8310 4b0bc96b-bc66-0410-9d44-ebda105a78c1