Changeset 959
- Timestamp:
- 12/26/09 22:54:46 (11 years ago)
- Location:
- branches/monitor-improvement
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/monitor-improvement/CMakeLists.txt
r811 r959 229 229 ) 230 230 231 #if the svnversion program is absent, this will leave the SVN_REVISION string empty, 232 #but won't stop CMake. 233 execute_process (COMMAND "svnversion" "-n" "${CMAKE_CURRENT_SOURCE_DIR}" OUTPUT_VARIABLE OSCAM_SVN_REVISION) 234 235 if (OSCAM_SVN_REVISION) 236 string (REGEX REPLACE "[0-9]+:" "" OSCAM_SVN_REVISION "${OSCAM_SVN_REVISION}") 237 string (REPLACE "M" "" OSCAM_SVN_REVISION "${OSCAM_SVN_REVISION}") 238 string (REPLACE "exported" "0" OSCAM_SVN_REVISION "${OSCAM_SVN_REVISION}") 239 else (OSCAM_SVN_REVISION) 240 set (OSCAM_SVN_REVISION "0") 241 endif (OSCAM_SVN_REVISION) 242 231 243 # pass the version to the compilations as a define 232 add_definitions ("-D'CS_SVN_VERSION=\"$ (shell svnversion -n ${CMAKE_CURRENT_SOURCE_DIR} | sed 's/[MS]$$//')\"'")244 add_definitions ("-D'CS_SVN_VERSION=\"${OSCAM_SVN_REVISION}\"'") 233 245 234 246 #----------------------- global compile and link options ------------------------------ -
branches/monitor-improvement/Makefile
r776 r959 1 1 SHELL = /bin/sh 2 2 3 VER = $(subst ",,$(filter-out \#define CS_VERSION,$(shell grep CS_VERSION globals.h)))$(shell svnversion -n . | sed 's/[MS]$$//')3 VER = $(subst ",,$(filter-out \#define CS_VERSION,$(shell grep CS_VERSION globals.h)))$(shell test -f /usr/bin/svnversion && svnversion -n . | sed 's/[MS]$$//' | sed 's/exported/0/' || echo -n 0 ) 4 4 CS_CONFDIR = '\"/usr/local/etc\"' 5 5 … … 64 64 OS_CULI="-lncurses" \ 65 65 OS_PTLI="-lpthread" \ 66 DS_OPTS="-O2 -DOS_LINUX -DCS_CONFDIR=${CS_CONFDIR} -Winline -Wall -Wno-implicit-function-declaration -Wno-parentheses -finline-functions -fomit-frame-pointer -D'CS_SVN_VERSION="'"$(shell svnversion -n . | sed 's/[MS]$$//')"'"'" \66 DS_OPTS="-O2 -DOS_LINUX -DCS_CONFDIR=${CS_CONFDIR} -Winline -Wall -Wno-implicit-function-declaration -Wno-parentheses -finline-functions -fomit-frame-pointer -D'CS_SVN_VERSION="'"$(shell test -f /usr/bin/svnversion && svnversion -n . | sed 's/[MS]$$//' | sed 's/exported/0/' || echo -n 0 )"'"'" \ 67 67 DS_CFLAGS="-c" \ 68 68 DS_LDFLAGS="" \ … … 85 85 OS_CULI="-lncurses" \ 86 86 OS_PTLI="-lpthread -lpcsclite" \ 87 DS_OPTS="-O2 -DOS_LINUX -DCS_CONFDIR=${CS_CONFDIR} -DHAVE_PCSC=1 -I/usr/include/PCSC -Winline -Wall -Wno-implicit-function-declaration -Wno-parentheses -finline-functions -fomit-frame-pointer -D'CS_SVN_VERSION="'"$(shell svnversion -n . | sed 's/[MS]$$//')"'"'" \87 DS_OPTS="-O2 -DOS_LINUX -DCS_CONFDIR=${CS_CONFDIR} -DHAVE_PCSC=1 -I/usr/include/PCSC -Winline -Wall -Wno-implicit-function-declaration -Wno-parentheses -finline-functions -fomit-frame-pointer -D'CS_SVN_VERSION="'"$(shell test -f /usr/bin/svnversion && svnversion -n . | sed 's/[MS]$$//' | sed 's/exported/0/' || echo -n 0 )"'"'" \ 88 88 DS_CFLAGS="-c" \ 89 89 DS_LDFLAGS="" \ … … 106 106 OS_CULI="-lncurses" \ 107 107 OS_PTLI="-lpthread" \ 108 DS_OPTS="-O2 -DOS_MACOSX -DNEED_DAEMON -DCS_NOSHM -DHAVE_PTHREAD_H -DUSE_PTHREAD -DCS_CONFDIR=${CS_CONFDIR} -DHAVE_PCSC=1 -Winline -Wall -Wno-implicit-function-declaration -Wno-parentheses -finline-functions -fomit-frame-pointer -D'CS_SVN_VERSION="'"$(shell svnversion -n . | sed 's/[MS]$$//')"'"'" \108 DS_OPTS="-O2 -DOS_MACOSX -DNEED_DAEMON -DCS_NOSHM -DHAVE_PTHREAD_H -DUSE_PTHREAD -DCS_CONFDIR=${CS_CONFDIR} -DHAVE_PCSC=1 -Winline -Wall -Wno-implicit-function-declaration -Wno-parentheses -finline-functions -fomit-frame-pointer -D'CS_SVN_VERSION="'"$(shell test -f /usr/bin/svnversion && svnversion -n . | sed 's/[MS]$$//' | sed 's/exported/0/' || echo -n 0 )"'"'" \ 109 109 DS_CFLAGS="-c" \ 110 110 DS_LDFLAGS="-framework PCSC" \ … … 128 128 OS_CULI="-lncurses" \ 129 129 OS_PTLI="-lpthread" \ 130 DS_OPTS="-O2 -DOS_FREEBSD -DBSD_COMP -DCS_CONFDIR=${CS_CONFDIR} -static-libgcc -D'CS_SVN_VERSION="'"$(shell svnversion -n . | sed 's/[MS]$$//')"'"'" \130 DS_OPTS="-O2 -DOS_FREEBSD -DBSD_COMP -DCS_CONFDIR=${CS_CONFDIR} -static-libgcc -D'CS_SVN_VERSION="'"$(shell test -f /usr/bin/svnversion && svnversion -n . | sed 's/[MS]$$//' | sed 's/exported/0/' || echo -n 0 )"'"'" \ 131 131 DS_CFLAGS="-c" \ 132 132 DS_LDFLAGS="" \ … … 149 149 OS_CULI="-lncurses" \ 150 150 OS_PTLI="-lpthread" \ 151 DS_OPTS="-O2 -DOS_FREEBSD -DBSD_COMP -DCS_CONFDIR=${CS_CONFDIR} -static-libgcc -D'CS_SVN_VERSION="'"$(shell svnversion -n . | sed 's/[MS]$$//')"'"'" \151 DS_OPTS="-O2 -DOS_FREEBSD -DBSD_COMP -DCS_CONFDIR=${CS_CONFDIR} -static-libgcc -D'CS_SVN_VERSION="'"$(shell test -f /usr/bin/svnversion && svnversion -n . | sed 's/[MS]$$//' | sed 's/exported/0/' || echo -n 0 )"'"'" \ 152 152 DS_CFLAGS="-c" \ 153 153 DS_LDFLAGS="" \ … … 170 170 OS_CULI="-lncurses" \ 171 171 OS_PTLI="-lpthread" \ 172 DS_OPTS="-O2 -DOS_LINUX -DTUXBOX -DPPC -DCS_CONFDIR='\"/var/tuxbox/config\"' -D'CS_SVN_VERSION="'"$(shell svnversion -n . | sed 's/[MS]$$//')"'"'" \172 DS_OPTS="-O2 -DOS_LINUX -DTUXBOX -DPPC -DCS_CONFDIR='\"/var/tuxbox/config\"' -D'CS_SVN_VERSION="'"$(shell test -f /usr/bin/svnversion && svnversion -n . | sed 's/[MS]$$//' | sed 's/exported/0/' || echo -n 0 )"'"'" \ 173 173 DS_CFLAGS="-c" \ 174 174 DS_LDFLAGS="" \ … … 186 186 OS_CULI="-lncurses" \ 187 187 OS_PTLI="-lpthread" \ 188 DS_OPTS="-O2 -DOS_LINUX -DTUXBOX -DPPC -DCS_CONFDIR='\"/var/tuxbox/config\"' -D'CS_SVN_VERSION="'"$(shell svnversion -n . | sed 's/[MS]$$//')"'"'" \188 DS_OPTS="-O2 -DOS_LINUX -DTUXBOX -DPPC -DCS_CONFDIR='\"/var/tuxbox/config\"' -D'CS_SVN_VERSION="'"$(shell test -f /usr/bin/svnversion && svnversion -n . | sed 's/[MS]$$//' | sed 's/exported/0/' || echo -n 0 )"'"'" \ 189 189 DS_CFLAGS="-c" \ 190 190 DS_LDFLAGS="" \ … … 208 208 OS_CULI="-lncurses" \ 209 209 OS_PTLI="-lpthread" \ 210 DS_OPTS="-O2 -DOS_LINUX -DSH4 -DTUXBOX -DCS_CONFDIR='\"/var/tuxbox/config\"' -D'CS_SVN_VERSION="'"$(shell svnversion -n . | sed 's/[MS]$$//')"'"'" \210 DS_OPTS="-O2 -DOS_LINUX -DSH4 -DTUXBOX -DCS_CONFDIR='\"/var/tuxbox/config\"' -D'CS_SVN_VERSION="'"$(shell test -f /usr/bin/svnversion && svnversion -n . | sed 's/[MS]$$//' | sed 's/exported/0/' || echo -n 0 )"'"'" \ 211 211 DS_CFLAGS="-c" \ 212 212 DS_LDFLAGS="" \ … … 229 229 OS_CULI="-lncurses" \ 230 230 OS_PTLI="-lpthread" \ 231 DS_OPTS="-O2 -DOS_CYGWIN32 -DCS_CONFDIR=${CS_CONFDIR} -static -D'CS_SVN_VERSION="'"$(shell svnversion -n . | sed 's/[MS]$$//')"'"'" \231 DS_OPTS="-O2 -DOS_CYGWIN32 -DCS_CONFDIR=${CS_CONFDIR} -static -D'CS_SVN_VERSION="'"$(shell test -f /usr/bin/svnversion && svnversion -n . | sed 's/[MS]$$//' | sed 's/exported/0/' || echo -n 0 )"'"'" \ 232 232 DS_CFLAGS="-c" \ 233 233 DS_LDFLAGS="" \ … … 250 250 OS_CULI="-lncurses" \ 251 251 OS_PTLI="-lpthread" \ 252 DS_OPTS="-O2 -DOS_CYGWIN32 -DCS_CONFDIR=${CS_CONFDIR} -I /tmp/include -D'CS_SVN_VERSION="'"$(shell svnversion -n . | sed 's/[MS]$$//')"'"'" \252 DS_OPTS="-O2 -DOS_CYGWIN32 -DCS_CONFDIR=${CS_CONFDIR} -I /tmp/include -D'CS_SVN_VERSION="'"$(shell test -f /usr/bin/svnversion && svnversion -n . | sed 's/[MS]$$//' | sed 's/exported/0/' || echo -n 0 )"'"'" \ 253 253 DS_CFLAGS="-c" \ 254 254 DS_LDFLAGS="" \ … … 271 271 OS_CULI="-lncurses" \ 272 272 OS_PTLI="-lpthread" \ 273 DS_OPTS="-O2 -DOS_SOLARIS -DOS_SOLARIS7 -DBSD_COMP -DCS_CONFDIR=${CS_CONFDIR} -static-libgcc -D'CS_SVN_VERSION="'"$(shell svnversion -n . | sed 's/[MS]$$//')"'"'" \273 DS_OPTS="-O2 -DOS_SOLARIS -DOS_SOLARIS7 -DBSD_COMP -DCS_CONFDIR=${CS_CONFDIR} -static-libgcc -D'CS_SVN_VERSION="'"$(shell test -f /usr/bin/svnversion && svnversion -n . | sed 's/[MS]$$//' | sed 's/exported/0/' || echo -n 0 )"'"'" \ 274 274 DS_CFLAGS="-c" \ 275 275 DS_LDFLAGS="-lsocket" \ … … 292 292 OS_CULI="-lncurses" \ 293 293 OS_PTLI="-lpthread" \ 294 DS_OPTS="-O2 -DOS_SOLARIS -DOS_SOLARIS7 -DBSD_COMP -DCS_CONFDIR=${CS_CONFDIR} -static-libgcc -D'CS_SVN_VERSION="'"$(shell svnversion -n . | sed 's/[MS]$$//')"'"'" \294 DS_OPTS="-O2 -DOS_SOLARIS -DOS_SOLARIS7 -DBSD_COMP -DCS_CONFDIR=${CS_CONFDIR} -static-libgcc -D'CS_SVN_VERSION="'"$(shell test -f /usr/bin/svnversion && svnversion -n . | sed 's/[MS]$$//' | sed 's/exported/0/' || echo -n 0 )"'"'" \ 295 295 DS_CFLAGS="-c" \ 296 296 DS_LDFLAGS="-lsocket" \ … … 313 313 OS_CULI="-lncurses" \ 314 314 OS_PTLI="-lpthreads" \ 315 DS_OPTS="-O2 -DOS_AIX -DOS_AIX42 -DCS_CONFDIR=${CS_CONFDIR} -static-libgcc -D'CS_SVN_VERSION="'"$(shell svnversion -n . | sed 's/[MS]$$//')"'"'" \315 DS_OPTS="-O2 -DOS_AIX -DOS_AIX42 -DCS_CONFDIR=${CS_CONFDIR} -static-libgcc -D'CS_SVN_VERSION="'"$(shell test -f /usr/bin/svnversion && svnversion -n . | sed 's/[MS]$$//' | sed 's/exported/0/' || echo -n 0 )"'"'" \ 316 316 DS_CFLAGS="-c" \ 317 317 DS_LDFLAGS="" \ … … 334 334 OS_CULI="-lncurses" \ 335 335 OS_PTLI="-lpthread" \ 336 DS_OPTS="-O2 -DOS_IRIX -DOS_IRIX65 -DCS_CONFDIR=${CS_CONFDIR} -static-libgcc -D'CS_SVN_VERSION="'"$(shell svnversion -n . | sed 's/[MS]$$//')"'"'" \336 DS_OPTS="-O2 -DOS_IRIX -DOS_IRIX65 -DCS_CONFDIR=${CS_CONFDIR} -static-libgcc -D'CS_SVN_VERSION="'"$(shell test -f /usr/bin/svnversion && svnversion -n . | sed 's/[MS]$$//' | sed 's/exported/0/' || echo -n 0 )"'"'" \ 337 337 DS_CFLAGS="-c" \ 338 338 DS_LDFLAGS="" \ … … 357 357 OS_CULI="-lncurses" \ 358 358 OS_PTLI="-lpthread" \ 359 DS_OPTS="-O2 -DOS_LINUX -DMIPSEL -DUCLIBC -DUSE_GPIO -DCS_CONFDIR=${CS_CONFDIR} -static-libgcc -D'CS_SVN_VERSION="'"$(shell svnversion -n . | sed 's/[MS]$$//')"'"'" \359 DS_OPTS="-O2 -DOS_LINUX -DMIPSEL -DUCLIBC -DUSE_GPIO -DCS_CONFDIR=${CS_CONFDIR} -static-libgcc -D'CS_SVN_VERSION="'"$(shell test -f /usr/bin/svnversion && svnversion -n . | sed 's/[MS]$$//' | sed 's/exported/0/' || echo -n 0 )"'"'" \ 360 360 DS_CFLAGS="-c" \ 361 361 DS_LDFLAGS="" \ … … 379 379 OS_CULI="-lncurses" \ 380 380 OS_PTLI="-lpthread" \ 381 DS_OPTS="-O2 -DOS_LINUX -DMIPSEL -DUCLIBC -DUSE_GPIO -DCS_CONFDIR=${CS_CONFDIR} -static-libgcc -D'CS_SVN_VERSION="'"$(shell svnversion -n . | sed 's/[MS]$$//')"'"'" \381 DS_OPTS="-O2 -DOS_LINUX -DMIPSEL -DUCLIBC -DUSE_GPIO -DCS_CONFDIR=${CS_CONFDIR} -static-libgcc -D'CS_SVN_VERSION="'"$(shell test -f /usr/bin/svnversion && svnversion -n . | sed 's/[MS]$$//' | sed 's/exported/0/' || echo -n 0 )"'"'" \ 382 382 DS_CFLAGS="-c" \ 383 383 DS_LDFLAGS="" \ … … 401 401 OS_CULI="-lncurses" \ 402 402 OS_PTLI="-lpthread" \ 403 DS_OPTS="-O2 -DOS_LINUX -DMIPSEL -DUCLIBC -DUSE_GPIO -DCS_CONFDIR=${CS_CONFDIR} -static-libgcc -D'CS_SVN_VERSION="'"$(shell svnversion -n . | sed 's/[MS]$$//')"'"'" \403 DS_OPTS="-O2 -DOS_LINUX -DMIPSEL -DUCLIBC -DUSE_GPIO -DCS_CONFDIR=${CS_CONFDIR} -static-libgcc -D'CS_SVN_VERSION="'"$(shell test -f /usr/bin/svnversion && svnversion -n . | sed 's/[MS]$$//' | sed 's/exported/0/' || echo -n 0 )"'"'" \ 404 404 DS_CFLAGS="-c" \ 405 405 DS_LDFLAGS="" \ … … 423 423 OS_CULI="-lncurses" \ 424 424 OS_PTLI="-lpthread" \ 425 DS_OPTS="-O2 -DOS_LINUX -DMIPSEL -DUCLIBC -DUSE_GPIO -DCS_CONFDIR=${CS_CONFDIR} -static-libgcc -D'CS_SVN_VERSION="'"$(shell svnversion -n . | sed 's/[MS]$$//')"'"'" \425 DS_OPTS="-O2 -DOS_LINUX -DMIPSEL -DUCLIBC -DUSE_GPIO -DCS_CONFDIR=${CS_CONFDIR} -static-libgcc -D'CS_SVN_VERSION="'"$(shell test -f /usr/bin/svnversion && svnversion -n . | sed 's/[MS]$$//' | sed 's/exported/0/' || echo -n 0 )"'"'" \ 426 426 DS_CFLAGS="-c" \ 427 427 DS_LDFLAGS="-static" \ … … 444 444 OS_CULI="-lncurses" \ 445 445 OS_PTLI="-lpthread" \ 446 DS_OPTS="-Iopenssl-include -O2 -DOS_LINUX -DMIPSEL -DUCLIBC -DCS_CONFDIR=${CS_CONFDIR} -static-libgcc -D'CS_SVN_VERSION="'"$(shell svnversion -n . | sed 's/[MS]$$//')"'"'" \446 DS_OPTS="-Iopenssl-include -O2 -DOS_LINUX -DMIPSEL -DUCLIBC -DCS_CONFDIR=${CS_CONFDIR} -static-libgcc -D'CS_SVN_VERSION="'"$(shell test -f /usr/bin/svnversion && svnversion -n . | sed 's/[MS]$$//' | sed 's/exported/0/' || echo -n 0 )"'"'" \ 447 447 DS_CFLAGS="-c" \ 448 448 DS_LDFLAGS="" \ … … 465 465 OS_CULI="-lncurses" \ 466 466 OS_PTLI="-lpthread" \ 467 DS_OPTS="-O2 -DOS_LINUX -DTUXBOX -DMIPSEL -DCS_CONFDIR='\"/var/tuxbox/config\"' -static-libgcc -D'CS_SVN_VERSION="'"$(shell svnversion -n . | sed 's/[MS]$$//')"'"'" \467 DS_OPTS="-O2 -DOS_LINUX -DTUXBOX -DMIPSEL -DCS_CONFDIR='\"/var/tuxbox/config\"' -static-libgcc -D'CS_SVN_VERSION="'"$(shell test -f /usr/bin/svnversion && svnversion -n . | sed 's/[MS]$$//' | sed 's/exported/0/' || echo -n 0 )"'"'" \ 468 468 DS_CFLAGS="-c" \ 469 469 DS_LDFLAGS="" \ … … 481 481 OS_CULI="-lncurses" \ 482 482 OS_PTLI="-lpthread" \ 483 DS_OPTS="-O2 -DOS_LINUX -DTUXBOX -DMIPSEL -DCS_CONFDIR='\"/var/tuxbox/config\"' -static-libgcc -D'CS_SVN_VERSION="'"$(shell svnversion -n . | sed 's/[MS]$$//')"'"'" \483 DS_OPTS="-O2 -DOS_LINUX -DTUXBOX -DMIPSEL -DCS_CONFDIR='\"/var/tuxbox/config\"' -static-libgcc -D'CS_SVN_VERSION="'"$(shell test -f /usr/bin/svnversion && svnversion -n . | sed 's/[MS]$$//' | sed 's/exported/0/' || echo -n 0 )"'"'" \ 484 484 DS_CFLAGS="-c" \ 485 485 DS_LDFLAGS="" \ … … 502 502 OS_CULI="-lncurses" \ 503 503 OS_PTLI="-lpthread" \ 504 DS_OPTS="-O2 -DOS_HPUX -DOS_HPUX10 -D_XOPEN_SOURCE_EXTENDED -DCS_CONFDIR=${CS_CONFDIR} -D'CS_SVN_VERSION="'"$(shell svnversion -n . | sed 's/[MS]$$//')"'"'" \504 DS_OPTS="-O2 -DOS_HPUX -DOS_HPUX10 -D_XOPEN_SOURCE_EXTENDED -DCS_CONFDIR=${CS_CONFDIR} -D'CS_SVN_VERSION="'"$(shell test -f /usr/bin/svnversion && svnversion -n . | sed 's/[MS]$$//' | sed 's/exported/0/' || echo -n 0 )"'"'" \ 505 505 DS_CFLAGS="-c" \ 506 506 DS_LDFLAGS="" \ … … 523 523 OS_CULI="-lncurses" \ 524 524 OS_PTLI="-lpthread" \ 525 DS_OPTS="-O2 -DOS_OSF -DOS_OSF5 -DCS_CONFDIR=${CS_CONFDIR} -D'CS_SVN_VERSION="'"$(shell svnversion -n . | sed 's/[MS]$$//')"'"'" \525 DS_OPTS="-O2 -DOS_OSF -DOS_OSF5 -DCS_CONFDIR=${CS_CONFDIR} -D'CS_SVN_VERSION="'"$(shell test -f /usr/bin/svnversion && svnversion -n . | sed 's/[MS]$$//' | sed 's/exported/0/' || echo -n 0 )"'"'" \ 526 526 XDS_CFLAGS="-I/usr/include -c" \ 527 527 DS_CFLAGS="-c" \ … … 545 545 OS_CULI="-lncurses" \ 546 546 OS_PTLI="-lpthread" \ 547 DS_OPTS="-DOS_LINUX -O2 -DARM -DALIGNMENT -DCS_CONFDIR=${CS_CONFDIR} -D'CS_SVN_VERSION="'"$(shell svnversion -n . | sed 's/[MS]$$//')"'"'" \547 DS_OPTS="-DOS_LINUX -O2 -DARM -DALIGNMENT -DCS_CONFDIR=${CS_CONFDIR} -D'CS_SVN_VERSION="'"$(shell test -f /usr/bin/svnversion && svnversion -n . | sed 's/[MS]$$//' | sed 's/exported/0/' || echo -n 0 )"'"'" \ 548 548 DS_CFLAGS="-c" \ 549 549 DS_LDFLAGS="" \ … … 567 567 OS_CULI="-lncurses" \ 568 568 OS_PTLI="-lpthread" \ 569 DS_OPTS="-DOS_LINUX -O2 -DARM -DALIGNMENT -DCS_CONFDIR=${CS_CONFDIR} -D'CS_SVN_VERSION="'"$(shell svnversion -n . | sed 's/[MS]$$//')"'"'" \569 DS_OPTS="-DOS_LINUX -O2 -DARM -DALIGNMENT -DCS_CONFDIR=${CS_CONFDIR} -D'CS_SVN_VERSION="'"$(shell test -f /usr/bin/svnversion && svnversion -n . | sed 's/[MS]$$//' | sed 's/exported/0/' || echo -n 0 )"'"'" \ 570 570 DS_CFLAGS="-c" \ 571 571 DS_LDFLAGS="" \ … … 589 589 OS_CULI="-lncurses" \ 590 590 OS_PTLI="-lpthread" \ 591 DS_OPTS="-DOS_LINUX -O2 -DARM -DALIGNMENT -DCS_CONFDIR=${CS_CONFDIR} -D'CS_SVN_VERSION="'"$(shell svnversion -n . | sed 's/[MS]$$//')"'"'" \591 DS_OPTS="-DOS_LINUX -O2 -DARM -DALIGNMENT -DCS_CONFDIR=${CS_CONFDIR} -D'CS_SVN_VERSION="'"$(shell test -f /usr/bin/svnversion && svnversion -n . | sed 's/[MS]$$//' | sed 's/exported/0/' || echo -n 0 )"'"'" \ 592 592 DS_CFLAGS="-c" \ 593 593 DS_LDFLAGS="" \ -
branches/monitor-improvement/cscrypt/bn_mul.c
r8 r959 225 225 int n, BN_ULONG *t) 226 226 { 227 int i,j,n2=n*2;228 unsigned int c1,c2,neg,zero;227 int c1,c2,i,j,n2=n*2; 228 unsigned int neg,zero; 229 229 BN_ULONG ln,lo,*p; 230 230 … … 679 679 if (i == 1 && !BN_get_flags(b,BN_FLG_STATIC_DATA)) 680 680 { 681 bn_wexpand(b,al);681 if (bn_wexpand(b,al) == NULL) goto err; 682 682 b->d[bl]=0; 683 683 bl++; … … 686 686 else if (i == -1 && !BN_get_flags(a,BN_FLG_STATIC_DATA)) 687 687 { 688 bn_wexpand(a,bl);688 if (bn_wexpand(a,bl) == NULL) goto err; 689 689 a->d[al]=0; 690 690 al++; … … 701 701 if (al == j) /* exact multiple */ 702 702 { 703 bn_wexpand(t,k*2);704 bn_wexpand(rr,k*2);703 if (bn_wexpand(t,k*2) == NULL) goto err; 704 if (bn_wexpand(rr,k*2) == NULL) goto err; 705 705 bn_mul_recursive(rr->d,a->d,b->d,al,t->d); 706 706 } 707 707 else 708 708 { 709 bn_wexpand(a,k);710 bn_wexpand(b,k);711 bn_wexpand(t,k*4);712 bn_wexpand(rr,k*4);709 if (bn_wexpand(a,k) == NULL) goto err; 710 if (bn_wexpand(b,k) == NULL) goto err; 711 if (bn_wexpand(t,k*4) == NULL) goto err; 712 if (bn_wexpand(rr,k*4) == NULL) goto err; 713 713 for (i=a->top; i<k; i++) 714 714 a->d[i]=0; -
branches/monitor-improvement/cscrypt/des.c
r64 r959 1 #include <stdlib.h> 1 2 #include <stdio.h> 2 3 #include <string.h> -
branches/monitor-improvement/csctapi/atr.c
r925 r959 25 25 #include "defines.h" 26 26 #include "atr.h" 27 #include "../globals.h" 27 28 #include <stdlib.h> 28 29 #include <string.h> -
branches/monitor-improvement/csctapi/pps.c
r925 r959 58 58 59 59 static int PPS_InitProtocol (PPS * pps, int protocol_selected); 60 61 //static void PPS_SelectFirstProtocol (PPS * pps);62 60 63 61 static BYTE PPS_GetPCK (BYTE * block, unsigned length); … … 183 181 if (OffersT[i]) 184 182 numprottype ++; 183 cs_debug("%i protocol types detected. Historical bytes: %s",numprottype, cs_hexdump(1,atr->hb,atr->hbn)); 185 184 186 185 //If more than one protocol type and/or TA1 parameter values other than the default values and/or N equeal to 255 is/are indicated in the answer to reset, the card shall know unambiguously, after having sent the answer to reset, which protocol type or/and transmission parameter values (FI, D, N) will be used. Consequently a selection of the protocol type and/or the transmission parameters values shall be specified. 187 186 ATR_GetParameter (atr, ATR_PARAMETER_N, &(pps->parameters.n)); 188 187 ATR_GetProtocolType(atr,1,&(pps->parameters.t)); //get protocol from TD1 189 bool NeedsPTS = ((pps-> icc->ifd->io->com != RTYP_SCI) && (pps->parameters.t != 14) && (numprottype > 1 || (atr->ib[0][ATR_INTERFACE_BYTE_TA].present == TRUE && atr->ib[0][ATR_INTERFACE_BYTE_TA].value != 0x11) || pps->parameters.n == 255)); //needs PTS according to ISO 7816 , SCI gets stuck on our PTS190 if (NeedsPTS ) {188 bool NeedsPTS = ((pps->parameters.t != 14) && (numprottype > 1 || (atr->ib[0][ATR_INTERFACE_BYTE_TA].present == TRUE && atr->ib[0][ATR_INTERFACE_BYTE_TA].value != 0x11) || pps->parameters.n == 255)); //needs PTS according to ISO 7816 , SCI gets stuck on our PTS 189 if (NeedsPTS && (pps->icc->ifd->io->com != RTYP_SCI)) { 191 190 // PTSS PTS0 PTS1 PTS2 PTS3 PCK 192 191 // PTSS PTS0 PTS1 PCK … … 215 214 } 216 215 } 217 //FIXME: If the card is able to process more than one protocol type and if one of those protocol types is indicated as T=0, then the protocol type T=0 shall indicated in TD1 as the first offered protocol, and is assumed if no PTS is performed.218 216 219 217 //FIXME Currently InitICC sets baudrate to 9600 for all T14 cards, which is the old behaviour... 220 218 if (!PPS_success) {//last PPS not succesfull 221 219 BYTE TA1; 222 if ( !NeedsPTS &&ATR_GetInterfaceByte (atr, 1 , ATR_INTERFACE_BYTE_TA, &TA1) == ATR_OK && pps->parameters.t != 14) {220 if (ATR_GetInterfaceByte (atr, 1 , ATR_INTERFACE_BYTE_TA, &TA1) == ATR_OK && pps->parameters.t != 14) { 223 221 pps->parameters.FI = TA1 >> 4; 224 222 ATR_GetParameter (atr, ATR_PARAMETER_D, &(pps->parameters.d)); 225 223 } 226 else { //do not obey TA1 if T14 , or when PTS is needed according to ISO, but failed, so not obeying ISO224 else { //do not obey TA1 if T14 227 225 pps->parameters.FI = ATR_DEFAULT_FI; 228 226 pps->parameters.d = ATR_DEFAULT_D; … … 232 230 ATR_GetProtocolType (atr, 1, &(pps->parameters.t)); 233 231 protocol_selected = 1; 234 cs_debug("No PTS, selected protocol 1: T%i, F=%.0f, D=%.6f, N=%.0f\n", pps->parameters.t, (double) atr_f_table[pps->parameters.FI], pps->parameters.d, pps->parameters.n); 232 233 if (NeedsPTS) { //FIXME we MUST discover PTS routine for Dreambox reader, now all cards in DBreaders which need PTS come here!!! 234 if (OffersT[0]) { 235 //If the card is able to process more than one protocol type and if one of those protocol types is indicated as T=0, then the protocol type T=0 shall indicated in TD1 as the first offered protocol, and is assumed if no PTS is performed. 236 pps->parameters.t = ATR_PROTOCOL_TYPE_T0; 237 pps->parameters.FI = ATR_DEFAULT_FI; //ignoring TA1 is necessary at least for all viaccess cards on dreambox readers 238 pps->parameters.d = ATR_DEFAULT_D; //but perhaps it is the general thing to do... 239 } 240 } 241 /////Here all non-ISO behaviour 242 // Nagra HD+ 243 // ATR: 3F FF 95 00 FF 91 81 71 FE 47 00 44 4E 41 53 50 31 34 32 20 52 65 76 47 43 34 63 244 // Protocol 1: TA1=95 TB1=00 TC1=FF TD1=91 (T1) 245 // Protocol 2: TA2=81 TD2=71 (T1) 246 // Protocol 3: TA3=FE TB3=47 TC3=00 no TD3 means T0 247 // 248 // Problem1: card somehow fails all PTS attempts; perhaps because N=255 and we try PTS without it? 249 // Problem2: card reports to support T0 but TA1=FE , which values are (still) undefined . On failure of PTS card reverts to TA=11 which 250 // makes the card fail 251 // We know the card needs 115200 (with cardmhz = 368) after ATR 252 // Solution: longterm: implement PTS2 253 // Solution: shorterm: this hardcoding 254 // 255 unsigned char nagra_hdplus[] = {0x44, 0x4E, 0x41, 0x53, 0x50}; //DNASP, not sure about timings of TIGER & others 256 if (atr->hbn >= sizeof(nagra_hdplus)) 257 if (!memcmp(atr->hb, nagra_hdplus, sizeof(nagra_hdplus))) { 258 ATR_GetProtocolType (atr, 1, &(pps->parameters.t)); 259 protocol_selected = 1; 260 if (ATR_GetInterfaceByte (atr, 1 , ATR_INTERFACE_BYTE_TA, &TA1) == ATR_OK) { 261 pps->parameters.FI = TA1 >> 4; 262 ATR_GetParameter (atr, ATR_PARAMETER_D, &(pps->parameters.d)); 263 } 264 } 265 // 266 // 267 /////End all non-ISO behaviour 268 if (pps->icc->ifd->io->com == RTYP_SCI) { 269 //// Here all fixes that are needed until PTS routine for Dreambox is found 270 //// End all fixes that are needed until PTS routine for Dreambox is found 271 if (atr->hbn >=6) 272 if (!memcmp( atr->hb, "IRDETO", 6 )) { //IRDETO needs TA1 behaviour on /dev/sci ; which other cards need ignore TA1 on T14? 273 pps->parameters.FI = TA1 >> 4; 274 ATR_GetParameter (atr, ATR_PARAMETER_D, &(pps->parameters.d)); 275 } 276 } 277 278 cs_debug("No PTS %s, selected protocol 1: T%i, F=%.0f, D=%.6f, N=%.0f\n", NeedsPTS?"happened":"needed", pps->parameters.t, (double) atr_f_table[pps->parameters.FI], pps->parameters.d, pps->parameters.n); 235 279 } 236 280 }//end length<0 … … 387 431 return PPS_ICC_ERROR; 388 432 389 433 ATR *atr = ICC_Async_GetAtr (pps->icc); 390 434 391 435 params.T = pps->parameters.t; 392 436 393 437 BYTE oldFI = params.FI; 394 438 // params.FI = pps->parameters.FI; //somehow setting this gets "card unsupported" 395 439 /* if (pps->icc->ifd->io->mhz > 368) { … … 406 450 407 451 if (oldFI != params.FI) 408 409 410 452 cs_log("Forcing params.FI from %i to %i", oldFI, params.FI); 453 454 double F = (double) atr_f_table[pps->parameters.FI]; 411 455 params.ETU = F / pps->parameters.d; 412 456 if (pps->parameters.n == 255) … … 514 558 return PPS_PROTOCOL_ERROR; 515 559 } 516 /* 517 static void PPS_SelectFirstProtocol (PPS * pps) 518 { 519 ATR *atr = ICC_Async_GetAtr (pps->icc); 520 unsigned np; 521 522 pps->parameters.t = ATR_PROTOCOL_TYPE_T0; 523 524 ATR_GetNumberOfProtocols (atr, &np); 525 526 527 // Get protocol offered by interface bytes T*2 if available, 528 // (that is, if TD1 is available), * otherwise use default T=0 529 530 if (np>1) 531 ATR_GetProtocolType (atr, 2, &(pps->parameters.t)); 532 533 #ifdef DEBUG_PROTOCOL 534 printf ("PPS: Protocol T=%d selected\n", pps->parameters.t); 535 #endif 536 } 537 */ 560 538 561 static BYTE PPS_GetPCK (BYTE * block, unsigned length) 539 562 { -
branches/monitor-improvement/globals.h
r949 r959 449 449 450 450 struct s_acasc_shm { 451 ushort count : 15;452 ushort deny : 1;451 ushort ac_count : 15; 452 ushort ac_deny : 1; 453 453 }; 454 454 … … 714 714 extern int chk_rsfilter(ECM_REQUEST *, int); 715 715 extern int chk_avail_reader(ECM_REQUEST *, struct s_reader *); 716 extern int matching_reader(ECM_REQUEST *, struct s_reader *); 716 717 extern void set_signal_handler(int , int , void (*)(int)); 717 718 extern void cs_log_config(void); 718 719 extern void cs_reinit_clients(void); 720 extern void cs_resolve(void); 719 721 720 722 #ifdef CS_ANTICASC 721 723 //extern void start_anticascader(void); 722 724 extern void init_ac(void); 723 extern void ac_init_stat( int);725 extern void ac_init_stat(); 724 726 extern int ac_init_log(char*); 725 727 extern void ac_do_stat(void); … … 756 758 // oscam-log 757 759 extern int cs_init_log(char *); 760 extern void cs_write_log(char *); 758 761 extern void cs_log(char *,...); 759 762 extern void cs_debug(char *,...); … … 773 776 extern int reader_device_init(char *, int); 774 777 extern int reader_checkhealth(void); 778 extern void reader_post_process(void); 775 779 extern int reader_ecm(ECM_REQUEST *); 776 780 extern int reader_emm(EMM_PACKET *); -
branches/monitor-improvement/module-cccam.c
r885 r959 337 337 if (errno != EINPROGRESS) { 338 338 cs_debug("cccam: conn_nb 3 (fd=%d)", sockfd); 339 //return(-1);339 //return(-1); 340 340 } 341 341 } … … 512 512 int n, i; 513 513 time_t t; 514 struct cc_data *cc = reader[ridx].cc;514 // struct cc_data *cc = reader[ridx].cc; 515 515 516 516 t=time((time_t *)0); … … 525 525 if (ecmtask[i].rc >= 10) { // stil active and waiting 526 526 // search for the ecm with the lowest time, this should be the next to go 527 if ((!n || ecmtask[n].tps.time-ecmtask[i].tps.time < 0) && &ecmtask[n] != cc->found) n = i;527 if ((!n || ecmtask[n].tps.time-ecmtask[i].tps.time < 0) && &ecmtask[n]) n = i; 528 528 } 529 529 } … … 539 539 ECM_REQUEST *cur_er; 540 540 541 if (!cc) return 0; 542 541 if (!cc || (pfd < 1)) { 542 if (er) { 543 er->rc = 0; 544 er->rcEx = 0x27; 545 cs_log("cccam: server not init!"); 546 write_ecm_answer(fd_c2m, er); 547 } 548 return 0; 549 } 550 551 // pthread_mutex_lock(&cc->ecm_busy); 543 552 if (pthread_mutex_trylock(&cc->ecm_busy) == EBUSY) { 544 553 cs_debug("cccam: ecm trylock: failed to get lock"); … … 566 575 return 0; // ecm already sent 567 576 } 577 578 //cc->found = cur_er; 568 579 569 580 if (buf) memcpy(buf, cur_er->ecm, cur_er->l); … … 646 657 while (card) { 647 658 if (card->caid == cur_er->caid) { // caid matches 648 649 659 LLIST_ITR sitr; 650 660 uint16 *sid = llist_itr_init(card->badsids, &sitr); 651 661 while (sid) { 652 if (*sid == cur_er->srvid) sid = llist_itr_remove(&sitr); 662 if (*sid == cur_er->srvid) 663 sid = llist_itr_remove(&sitr); 653 664 else sid = llist_itr_next(&sitr); 654 665 } … … 658 669 } 659 670 llist_itr_release(&itr); 660 } 661 662 pthread_mutex_unlock(&cc->lock); 671 672 pthread_mutex_unlock(&cc->ecm_busy); 673 } 674 663 675 return 0; 664 676 } 665 666 // this is a hack and it's baaaaaad. It's also not used yet!667 677 /* 668 static void cc_rebuild_caid_tab()669 {670 int zz;671 for(zz = 0; zz < CS_MAXCAIDTAB; zz++) {672 cs_log("caid %x", reader[ridx].ctab.caid[zz]);673 }674 }675 */676 677 678 static int cc_abort_user_ecms(){ 678 679 int n, i; … … 699 700 700 701 } 701 702 */ 702 703 static cc_msg_type_t cc_parse_msg(uint8 *buf, int l) 703 704 { 704 705 int ret = buf[1]; 705 706 struct cc_data *cc = reader[ridx].cc; 706 707 pthread_mutex_lock(&cc->lock);708 707 709 708 switch (buf[1]) { … … 716 715 break; 717 716 case MSG_NEW_CARD: 718 // find blank caid slot in tab and add caid719 717 { 720 718 int i = 0; 721 /*, p = 0;722 while(reader[ridx].ctab.caid[i]) {723 if (reader[ridx].ctab.caid[i] == b2i(2, buf+12)) p = 1;724 i++;725 }726 if (!p) {727 reader[ridx].ctab.caid[i] = b2i(2, buf+12);728 }729 */730 731 // if (b2i(2, buf+12) == reader[ridx].ctab.caid[0]) { // only add cards with relevant caid (for now)732 // int i;733 719 struct cc_card *card = malloc(sizeof(struct cc_card)); 734 720 … … 826 812 } 827 813 828 pthread_mutex_unlock(&cc->lock);829 814 return ret; 830 815 } … … 851 836 { 852 837 int n; 838 struct cc_data *cc = reader[ridx].cc; 853 839 uchar *cbuf = malloc(l); 854 840 855 841 memcpy(cbuf, buf, l); // make a copy of buf 842 843 pthread_mutex_lock(&cc->lock); 856 844 857 845 if (!is_server) { … … 879 867 X_FREE(cbuf); 880 868 869 pthread_mutex_unlock(&cc->lock); 870 881 871 return(n); 882 872 } … … 964 954 pfd=client[cs_idx].udp_fd; 965 955 966 if (cc_send_cli_data( cc)<=0) {956 if (cc_send_cli_data()<=0) { 967 957 cs_log("cccam: login failed, could not send client data"); 968 958 return -3; -
branches/monitor-improvement/oscam-ac.c
r573 r959 23 23 } 24 24 25 void ac_init_stat( int i)25 void ac_init_stat() 26 26 { 27 27 memset(ac_stat, 0, sizeof(ac_stat)); … … 53 53 { 54 54 idx = ac_stat[i].idx; 55 ac_stat[i].stat[idx] = acasc[i]. count;56 acasc[i]. count=0;55 ac_stat[i].stat[idx] = acasc[i].ac_count; 56 acasc[i].ac_count=0; 57 57 cl_idx = idx_from_ac_idx(i); 58 58 … … 66 66 if( client[cl_idx].ac_penalty==2 ) {// banned 67 67 cs_debug("user '%s' banned", client[cl_idx].usr); 68 acasc[i]. deny=1;68 acasc[i].ac_deny=1; 69 69 } 70 70 else … … 76 76 exceeds+=(ac_stat[i].stat[j]>client[cl_idx].ac_limit); 77 77 } 78 prev_deny=acasc[i]. deny;79 acasc[i]. deny = (exceeds >= cfg->ac_denysamples);78 prev_deny=acasc[i].ac_deny; 79 acasc[i].ac_deny = (exceeds >= cfg->ac_denysamples); 80 80 81 81 cs_debug("%s limit=%d, max=%d, samples=%d, dsamples=%d, ac[ci=%d][si=%d]:", … … 86 86 ac_stat[i].stat[4], ac_stat[i].stat[5], ac_stat[i].stat[6], 87 87 ac_stat[i].stat[7], ac_stat[i].stat[8], ac_stat[i].stat[9]); 88 if( acasc[i]. deny ) {88 if( acasc[i].ac_deny ) { 89 89 cs_log("user '%s' exceeds limit", client[cl_idx].usr); 90 90 ac_stat[i].stat[idx] = 0; … … 93 93 } 94 94 } 95 else if( acasc[i]. deny )95 else if( acasc[i].ac_deny ) 96 96 { 97 97 prev_deny=1; 98 acasc[i]. deny=0;98 acasc[i].ac_deny=0; 99 99 if( cl_idx!=-1 ) 100 100 cs_log("restored access for inactive user '%s'", client[cl_idx].usr); … … 103 103 } 104 104 105 if( !acasc[i]. deny && !prev_deny )105 if( !acasc[i].ac_deny && !prev_deny ) 106 106 ac_stat[i].idx = (ac_stat[i].idx + 1) % cfg->ac_samples; 107 107 } … … 150 150 if( level==1 ) 151 151 { 152 if( er->rc==7 ) acasc[client[cs_idx].ac_idx]. count++;152 if( er->rc==7 ) acasc[client[cs_idx].ac_idx].ac_count++; 153 153 if( er->rc>3 ) return; // not found 154 154 if( memcmp(ac_ecmd5, er->ecmd5, CS_ECMSTORESIZE) != 0 ) 155 155 { 156 acasc[client[cs_idx].ac_idx]. count+=ac_dw_weight(er);156 acasc[client[cs_idx].ac_idx].ac_count+=ac_dw_weight(er); 157 157 memcpy(ac_ecmd5, er->ecmd5, CS_ECMSTORESIZE); 158 158 } … … 160 160 } 161 161 162 if( acasc[client[cs_idx].ac_idx]. deny )162 if( acasc[client[cs_idx].ac_idx].ac_deny ) 163 163 if( client[cs_idx].ac_penalty ) 164 164 { -
branches/monitor-improvement/oscam.c
r928 r959 260 260 } 261 261 262 static void cs_alarm( int sig)262 static void cs_alarm() 263 263 { 264 264 cs_debug("Got alarm signal"); … … 267 267 } 268 268 269 static void cs_master_alarm( int sig)269 static void cs_master_alarm() 270 270 { 271 271 cs_log("PANIC: master deadlock! last location: %s", mloc); … … 275 275 } 276 276 277 static void cs_sigpipe( int sig)277 static void cs_sigpipe() 278 278 { 279 279 if ((cs_idx) && (master_pid!=getppid())) … … 832 832 } 833 833 834 static void cs_client_resolve( void *dummy)834 static void cs_client_resolve() 835 835 { 836 836 while (1) … … 920 920 { 921 921 case PIP_ID_LOG: 922 cs_write_log( ptr);922 cs_write_log((char *)ptr); 923 923 break; 924 924 } … … 963 963 set_signal_handler(SIGHUP, 1, ac_init_stat); 964 964 965 ac_init_stat( 0);965 ac_init_stat(); 966 966 while(1) 967 967 { … … 1847 1847 if ((er->caid==ttab->bt_caidfrom[n]) && ((er->srvid==ttab->bt_srvid[n]) || (ttab->bt_srvid[n])==mask_all)) 1848 1848 { 1849 char hack_n3[13]={0x70, 0x51, 0xc7, 0x00, 0x00, 0x00, 0x01, 0x10, 0x10, 0x00, 0x87, 0x12, 0x07};1850 char hack_n2[13]={0x70, 0x51, 0xc9, 0x00, 0x00, 0x00, 0x01, 0x10, 0x10, 0x00, 0x48, 0x12, 0x07};1849 uchar hack_n3[13]={0x70, 0x51, 0xc7, 0x00, 0x00, 0x00, 0x01, 0x10, 0x10, 0x00, 0x87, 0x12, 0x07}; 1850 uchar hack_n2[13]={0x70, 0x51, 0xc9, 0x00, 0x00, 0x00, 0x01, 0x10, 0x10, 0x00, 0x48, 0x12, 0x07}; 1851 1851 er->caid=ttab->bt_caidto[n]; 1852 1852 er->prid=0; … … 2115 2115 { 2116 2116 case PIP_ID_LOG: 2117 cs_write_log( ptr);2117 cs_write_log((char *)ptr); 2118 2118 break; 2119 2119 case PIP_ID_HUP: -
branches/monitor-improvement/reader-common.c
r885 r959 440 440 sprintf (token, "%swrite_%s_%s.%s", cs_confdir, (ep->emm[0] == 0x82) ? "UNIQ" : "SHARED", buf, "txt"); 441 441 if (!(fp = fopen (token, "w"))) 442 cs_log ("ERROR: Cannot open EMM.txt file '%s' (errno=%d)\n", token, errno); 443 else { 444 cs_log ("Succesfully written text EMM to %s.", token); 445 int emm_length = ((ep->emm[1] & 0x0f) << 8) | ep->emm[2]; 446 fprintf (fp, "%s", cs_hexdump (0, ep->emm, emm_length + 3)); 447 fclose (fp); 442 { 443 cs_log ("ERROR: Cannot open EMM.txt file '%s' (errno=%d)\n", token, errno); 444 } 445 else 446 { 447 cs_log ("Succesfully written text EMM to %s.", token); 448 int emm_length = ((ep->emm[1] & 0x0f) << 8) | ep->emm[2]; 449 fprintf (fp, "%s", cs_hexdump (0, ep->emm, emm_length + 3)); 450 fclose (fp); 448 451 } 449 452 … … 451 454 sprintf (token, "%swrite_%s_%s.%s", cs_confdir, (ep->emm[0] == 0x82) ? "UNIQ" : "SHARED", buf, "emm"); 452 455 if (!(fp = fopen (token, "wb"))) 453 cs_log ("ERROR: Cannot open EMM.emm file '%s' (errno=%d)\n", token, errno); 454 else { 455 cs_log ("Succesfully written binary EMM to %s.", token); 456 fwrite (ep, sizeof (*ep), 1, fp); 457 fclose (fp); 456 { 457 cs_log ("ERROR: Cannot open EMM.emm file '%s' (errno=%d)\n", token, errno); 458 } 459 else 460 { 461 if (fwrite(ep, sizeof (*ep), 1, fp) == 1) 462 { 463 cs_log ("Succesfully written binary EMM to %s.", token); 464 } 465 else 466 { 467 cs_log ("ERROR: Cannot write binary EMM to %s (errno=%d)\n", token, errno); 468 } 469 fclose (fp); 458 470 } 459 471 } -
branches/monitor-improvement/reader-conax.c
r473 r959 259 259 while (cta_res[cta_lr-2]==0x98) 260 260 { 261 insCA[4]=cta_res[ 1]; // get len261 insCA[4]=cta_res[cta_lr-1]; // get len 262 262 read_cmd(insCA, NULL); // read 263 263 if ((cta_res[cta_lr-2]==0x90) || (cta_res[cta_lr-2]==0x98)) -
branches/monitor-improvement/reader-dre.c
r885 r959 113 113 case 0xe2: 114 114 cs_log ("DRECRYPT wrong provider: %s.", cs_hexdump (0, cta_res, cta_lr)); 115 break; 116 case 0xe3: 117 cs_log ("DRECRYPT illegal command: %s.", cs_hexdump (0, cta_res, cta_lr)); 115 118 break; 116 119 case 0xec: … … 315 318 for (i = 0; i < 2; i++) { 316 319 memcpy (emmcmd52 + 1, ep->emm + 5 + 32 + i * 56, 56); 320 // check for shared address 321 if(ep->emm[3]!=reader[ridx].sa[0][0]) 322 return 1; // ignore, wrong address 317 323 emmcmd52[0x39] = provider; 318 324 if ((dre_cmd (emmcmd52)))
Note:
See TracChangeset
for help on using the changeset viewer.