Optimize file_exists() function.

Going through all of the stdio by using fopen(3) just to check if
file exists is not optimal. It is far easier (and faster) to use
access(2).

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@7734 4b0bc96b-bc66-0410-9d44-ebda105a78c1
webif: Show picon image only when the picon exists.

It turns out that showing empty image in the place of non existing
picon annoys users (who would've known :) With this changeset the
code checks whether picon can be found and only if it exists then
shows it, otherwise channel name is shown instead.

This is another fix for ticket #2672.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@7735 4b0bc96b-bc66-0410-9d44-ebda105a78c1
Revert "webif: Return 1x1 gif image when an image is not found."

This reverts commit r7542. The problem was fixed better in r7735.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@7736 4b0bc96b-bc66-0410-9d44-ebda105a78c1
webif: Return correct http error code when image was not found.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@7737 4b0bc96b-bc66-0410-9d44-ebda105a78c1
Working CDS NL fix cccam tested over 2 hops... (who said it cant be done...)  


git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@7738 4b0bc96b-bc66-0410-9d44-ebda105a78c1
DVBAPI get rid of annoying log entries!
If you want to inspect them use loglevel -d128


git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@7739 4b0bc96b-bc66-0410-9d44-ebda105a78c1
Softfail malformed card should be initialized also


git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@7740 4b0bc96b-bc66-0410-9d44-ebda105a78c1
Only fail if ATR_initFromArray returns ERROR
Some ATRs are malformed and do softfail, but actually do work so dont fail them
ATR_OK is returned if ATR is 100% OK


git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@7741 4b0bc96b-bc66-0410-9d44-ebda105a78c1
Fix for misleading message ATR cardspeed and actual clock of readerdevice.
Take notice: they dont have to match to clock the card to the correct frequency!
Get information about the readerdevice that is driving the card to make sure you clock it correct!


git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@7742 4b0bc96b-bc66-0410-9d44-ebda105a78c1
ATR on the fly fully interpreted... hope you all learn as much from it as I did ;)


git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@7743 4b0bc96b-bc66-0410-9d44-ebda105a78c1
csctapi: Fix couple of warnings seen on 32bit compile.

The warnings were:
  csctapi/ifd_sci.c: In function 'Sci_Read_ATR':
  csctapi/ifd_sci.c:139:5: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long int' [-Wformat]
  csctapi/ifd_sci.c:140:5: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long int' [-Wformat]
  csctapi/ifd_sci.c:146:14: warning: unused variable 'PPS' [-Wunused-variable]
  csctapi/ifd_sci.c:165:13: warning: unused variable 'BWT' [-Wunused-variable]

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@7744 4b0bc96b-bc66-0410-9d44-ebda105a78c1
Small fix for ATR on the fly and ATR_InitFromArry:
T14 protocol also doesnt use TCK byte.
Tnx to Gorgone for reporting!


git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@7745 4b0bc96b-bc66-0410-9d44-ebda105a78c1
pcsc: Fix stack overwrite.

We trying to write 64 bytes into ATR_MAX_SIZE (31) bytes sized array.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@7746 4b0bc96b-bc66-0410-9d44-ebda105a78c1
pcsc: Init card context.

Try fix for ticket #2868.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@7747 4b0bc96b-bc66-0410-9d44-ebda105a78c1
pcsc: Add debug message with card handle.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@7748 4b0bc96b-bc66-0410-9d44-ebda105a78c1
Revert r7747, it is wrong to initialize hCard that way.

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@7749 4b0bc96b-bc66-0410-9d44-ebda105a78c1
csctapi: mp35 reader init fixes

git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@7750 4b0bc96b-bc66-0410-9d44-ebda105a78c1
Fix for nonworking PCSC readers!
Tnx to Sulge and The_Raven for their good debugging and test work 


git-svn-id: http://streamboard.de.vu/svn/oscam/trunk@7751 4b0bc96b-bc66-0410-9d44-ebda105a78c1
pcsc: Fix oscam crash on PCSC reader init.

Before the conversion to new cardreader API when PCSC reader
was initialized the function just exited. After the conversion
extra ATR parsing functions were called and this caused crashes.

This should fix ticket #2868.

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