newcamd: Fix regression introduced in r8455.

This restores correct functioning of newcamd when mgclient setting
is enabled.

Fixes ticket #3209.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8470 4b0bc96b-bc66-0410-9d44-ebda105a78c1
newcamd: Prevent memory leak when clearing struct s_ptab.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8471 4b0bc96b-bc66-0410-9d44-ebda105a78c1
Allow card system modules to allocate per reader private data.

This is preparation for moving card system specific variables out
of struct s_reader into private structures accessed only from
the card system module.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8472 4b0bc96b-bc66-0410-9d44-ebda105a78c1
Make sure private card system data is freed before calling into card_init().

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8473 4b0bc96b-bc66-0410-9d44-ebda105a78c1
build: Use $(MAKE) instead of `make`.

On some systems (FreeBSD) `make` is named `gmake` and using
`make` in the Makefile breaks the build. The correct way of
calling make inside a Makefile is to use `$(MAKE)` variable.

This fixes distclean and README.build targets. Reported by kraiv.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8474 4b0bc96b-bc66-0410-9d44-ebda105a78c1
Use IPPROTO_TCP instead of SOL_TCP for cross-platform compatibility.

Modern Linux tcp(7) man page doesn't even mention SOL_TCP. The
correct and portable way is to use IPPROTO_TCP.

This fixes compilation of FreeBSD. Reported by kraiv.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8475 4b0bc96b-bc66-0410-9d44-ebda105a78c1
bulcrypt: Log message at the end of subscription info.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8476 4b0bc96b-bc66-0410-9d44-ebda105a78c1
griffin: Use private card system data.

This commit should not introduce functional changes. It just migrates
variables out of struct s_reader into local private structure.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8477 4b0bc96b-bc66-0410-9d44-ebda105a78c1
bulcrypt: Use private card system data.

This commit should not introduce functional changes. It just migrates
variables out of struct s_reader into local private structure.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8478 4b0bc96b-bc66-0410-9d44-ebda105a78c1
dgcrypt: Use private card system data.

This commit should not introduce functional changes. It just migrates
variables out of struct s_reader into local private structure.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8479 4b0bc96b-bc66-0410-9d44-ebda105a78c1
CW Cyclecheck add check of new cw active part, to prevent bad cw
http://www.streamboard.tv/wbb2/thread.php?postid=455359#post455359

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8480 4b0bc96b-bc66-0410-9d44-ebda105a78c1
CW Cyclecheck small fix (typo)


git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8481 4b0bc96b-bc66-0410-9d44-ebda105a78c1
CW Cyclecheck 
*fix cwcycle_sensitive on double Requests


git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8482 4b0bc96b-bc66-0410-9d44-ebda105a78c1
viaccess: Use private card system data.

This commit should not introduce functional changes. It just migrates
variables out of struct s_reader into local private structure.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8483 4b0bc96b-bc66-0410-9d44-ebda105a78c1
videoguard: Use private card system data.

This commit should not introduce functional changes. It just migrates
variables out of struct s_reader into local private structure.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8484 4b0bc96b-bc66-0410-9d44-ebda105a78c1
dre: Use private card system data.

This commit should not introduce functional changes. It just migrates
variables out of struct s_reader into local private structure.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8485 4b0bc96b-bc66-0410-9d44-ebda105a78c1
nagra: Use private card system data.

This commit should not introduce functional changes. It just migrates
variables out of struct s_reader into local private structure.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8486 4b0bc96b-bc66-0410-9d44-ebda105a78c1
cryptoworks: Use private card system data.

This commit should not introduce functional changes. It just migrates
variables out of struct s_reader into local private structure.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8487 4b0bc96b-bc66-0410-9d44-ebda105a78c1
irdeto: Use private card system data.

This commit should not introduce functional changes. It just migrates
variables out of struct s_reader into local private structure.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@8488 4b0bc96b-bc66-0410-9d44-ebda105a78c1
Declare variables static where needed.

Global variables that are used only in the module where they are defined
should be set to static. This gives the compiler better understanding of
the vars, we get warnings if they are unused and also they are zeroed on
program start for free.

These variables were found by pglobal tool from pahole. Here are the
results of this patch on 32-bit defconfig:

bloat-o-meter report:

{{{
  add/remove: 0/3 grow/shrink: 0/5 up/down: 0/-1766 (-1766)
  function                                     old     new   delta
  gbox_decrypt8                                196     195      -1
  main                                        6236    6220     -16
  dvbapi_process_input                        2955    2939     -16
  dvbapi_init_listenfd                         297     281     -16
  CHANNEL_CACHE                                 16       -     -16
  S_EMM_FILTER                                  60       -     -60
  cc_check_version                             727     366    -361
  cwcache                                     1280       -   -1280
}}}

size report:

{{{
    text     data      bss      dec    hex filename
 1000586     1944    60744  1063274 10396a before/oscam-1.20-unstable_svn8488-i486-slackware-linux.debug
 1000406     1760    59336  1061502 10327e  after/oscam-1.20-unstable_svn8489-i486-slackware-linux.debug
}}}

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