Changeset 1641


Ignore:
Timestamp:
02/21/10 10:22:47 (11 years ago)
Author:
alno
Message:

WebIf:

  • merge 1635-1639 of trunk (ump1753?) Thanks Dingo
Location:
branches/monitor-improvement
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/monitor-improvement/CMakeLists.txt

    r1630 r1641  
    162162endif(HAVE_DVBAPI)
    163163
     164if (WEBIF)
     165    add_definitions ("-DWEBIF")
     166endif (WEBIF)
     167
    164168check_include_file ("pthread.h" HAVE_PTHREAD)
    165169if (HAVE_PTHREAD)
     
    237241                add_library(imp_libusb STATIC IMPORTED)
    238242                set_property(TARGET imp_libusb PROPERTY IMPORTED_LOCATION /usr/local/lib/libusb-1.0.a)
     243            elseif (EXISTS /usr/lib/libusb-1.0.a)
     244                message(STATUS "  static libusb 1.0 found : /usr/lib/libusb-1.0.a . Adding smartreader support ")
     245                add_definitions ("-DLIBUSB")
     246                add_library(imp_libusb STATIC IMPORTED)
     247                set_property(TARGET imp_libusb PROPERTY IMPORTED_LOCATION /usr/lib/libusb-1.0.a)
    239248            else (EXISTS /usr/local/lib/libusb-1.0.a)
    240                 message(STATUS "  static libusb 1.0 not found (/usr/local/lib/libusb-1.0.a) . No smartreader support ")
     249                message(STATUS "  static libusb 1.0 not found (not in /usr/local/lib/ or /usr/lib/) . No smartreader support ")
    241250                unset(HAVE_LIBUSB)
    242251                unset(HAVE_LIBRT)
     
    487496    message (STATUS "  use system libusb functions")
    488497endif (HAVE_LIBUSB)
     498if (WEBIF)
     499    message (STATUS "  Web interface enabled")
     500endif (WEBIF)
    489501message (STATUS "")
  • branches/monitor-improvement/csctapi/ifd_smartreader.c

    r1600 r1641  
    185185        EnableSmartReader(reader, reader->sr_config.fs/10000, reader->sr_config.F, (BYTE)reader->sr_config.D, reader->sr_config.N, reader->sr_config.T, reader->sr_config.inv,reader->sr_config.parity);
    186186        sched_yield();
     187        cs_sleepms(500); //smartreader in mouse mode needs this, so it might also be needed in native mode.
    187188       
    188189        //Reset smartcard
     
    516517    reader->sr_config.max_packet_size = 0;
    517518
    518     reader->sr_config.interface = 0;
    519     reader->sr_config.index = 0;
     519    reader->sr_config.interface = INTERFACE_ANY;
     520    reader->sr_config.index = INTERFACE_A;
    520521    reader->sr_config.in_ep = 0x02;
    521522    reader->sr_config.out_ep = 0x82;
  • branches/monitor-improvement/module-cccam.c

    r1630 r1641  
    10071007static void cc_srv_report_cards()
    10081008{
    1009   uint id = 1, r, j, k;
     1009  int j;
     1010  uint id = 1, r, k;
    10101011  uint8 hop = 0, reshare;
    10111012  uint8 buf[CC_MAXMSGSIZE];
     
    11751176  cc_srv_report_cards();
    11761177
    1177   while ((i=process_input(mbuf, sizeof(mbuf), cfg->cmaxidle))>0);
     1178  // check for clienttimeout, if timeout occurs try to send keepalive
     1179  for(;;)
     1180  {
     1181    i=process_input(mbuf, sizeof(mbuf), cfg->cmaxidle);
     1182     
     1183    if (i == -9)
     1184    {
     1185      if (cc_cmd_send(NULL, 0, MSG_KEEPALIVE) > 0)
     1186      {
     1187        cs_debug("cccam: keepalive");
     1188        i = 0;
     1189      }
     1190    }
     1191     
     1192    if (i < 0)
     1193    {
     1194      break;
     1195    }
     1196  }
    11781197
    11791198  cs_disconnect_client();
  • branches/monitor-improvement/reader-dre.c

    r1401 r1641  
    106106
    107107    if (pbm[0] == 0xff)
    108       cs_log ("[dre-reader] no active packages");
     108      cs_ri_log ("[dre-reader] no active packages");
    109109    else
    110110      for (i = 0; i < 32; i++)
     
    129129      int endmonth = temp->tm_mon + 1;
    130130      int endday = temp->tm_mday;
    131       cs_log ("[dre-reader] active package %i valid from %04i/%02i/%02i to %04i/%02i/%02i", i, startyear, startmonth, startday,
     131      cs_ri_log ("[dre-reader] active package %i valid from %04i/%02i/%02i to %04i/%02i/%02i", i, startyear, startmonth, startday,
    132132          endyear, endmonth, endday);
    133133    }
     
    233233
    234234  //cs_ri_log("[dre-reader] type: DRE Crypt, caid: %04X, serial: %llu, card: v%x",
    235   cs_log ("[dre-reader] type: DRE Crypt, caid: %04X, serial: %s, dre id: %i%i%i%08i, geocode %i, card: %s v%i.%i",
     235  cs_ri_log ("[dre-reader] type: DRE Crypt, caid: %04X, serial: %s, dre id: %i%i%i%08i, geocode %i, card: %s v%i.%i",
    236236      reader[ridx].caid[0], cs_hexdump (0, reader[ridx].hexserial + 2, 4), dre_chksum, provider - 16,
    237237      major_version + 1, low_dre_id, geocode, card, major_version, minor_version);
    238   cs_log ("[dre-reader] Provider name:%s.", provname);
     238  cs_ri_log ("[dre-reader] Provider name:%s.", provname);
    239239
    240240
     
    242242  memcpy (reader[ridx].sa[0], reader[ridx].hexserial + 2, 1);   //copy first byte of unique address also in shared address, because we dont know what it is...
    243243
    244   cs_log ("[dre-reader] SA = %02X%02X%02X%02X, UA = %s", reader[ridx].sa[0][0], reader[ridx].sa[0][1], reader[ridx].sa[0][2],
     244  cs_ri_log ("[dre-reader] SA = %02X%02X%02X%02X, UA = %s", reader[ridx].sa[0][0], reader[ridx].sa[0][1], reader[ridx].sa[0][2],
    245245      reader[ridx].sa[0][3], cs_hexdump (0, reader[ridx].hexserial + 2, 4));
    246246
  • branches/monitor-improvement/reader-seca.c

    r1401 r1641  
    5050  l_name[0]=(l_name[8]) ? ',' : 0;
    5151  reader[ridx].availkeys[i][0]=valid; //misusing availkeys to register validity of provider
    52   cs_log("[seca-reader] provider: %d, valid: %i%s, expiry date: %4d/%02d/%02d",
     52  cs_ri_log("[seca-reader] provider: %d, valid: %i%s, expiry date: %4d/%02d/%02d",
    5353         i+1, valid,l_name, year, month, day);
    5454  memcpy(&reader[ridx].sa[i][0], cta_res+18, 4);
    5555  if (valid==1) //if not expired
    56     cs_log("[seca-reader] SA: %s", cs_hexdump(0, cta_res+18, 4));
    57 //    cs_log("[seca-reader] SA: %02X%02X%02X%02X.",cta_res[18],cta_res[19],cta_res[20],cta_res[21]);
     56    cs_ri_log("[seca-reader] SA: %s", cs_hexdump(0, cta_res+18, 4));
    5857  return OK;
    5958}
     
    116115  if( cfg->ulparent != 0 ){
    117116      write_cmd(ins30, ins30data);
    118       cs_log("[seca-reader] ins30_answer: %02x%02x",cta_res[0], cta_res[1]);
     117      cs_ri_log("[seca-reader] ins30_answer: %02x%02x",cta_res[0], cta_res[1]);
    119118  }else {
    120       cs_log("[seca-reader] parental locked");
     119      cs_ri_log("[seca-reader] parental locked");
    121120  }
    122121  cs_log("[seca-reader] ready for requests");
     
    256255    switch (cta_res[0]) {
    257256    case 0x04:
    258       cs_log ("[seca-reader] no PBM for provider %i", prov + 1);
     257      cs_ri_log ("[seca-reader] no PBM for provider %i", prov + 1);
    259258      break;
    260259    case 0x83:
    261260      memcpy (pbm, cta_res + 1, 8);
    262       cs_log ("[seca-reader] PBM for provider %i: %s", prov + 1, cs_hexdump (0, pbm, 8));
     261      cs_ri_log ("[seca-reader] PBM for provider %i: %s", prov + 1, cs_hexdump (0, pbm, 8));
    263262      break;
    264263    default:
  • branches/monitor-improvement/reader-videoguard2.c

    r1640 r1641  
    735735    if ((atr_size == sizeof (atr_bskyb)) && (memcmp (atr, atr_bskyb, atr_size) == 0))
    736736    {
    737         cs_log("[videoguard2-reader] type: VideoGuard BSkyB");
     737        cs_ri_log("[videoguard2-reader] type: VideoGuard BSkyB");
    738738        /* BSkyB seems to need one additionnal byte in the serial communication... */
    739739        io_serial_need_dummy_char = 1;
     
    742742    else if ((atr_size == sizeof (atr_bskyb_new)) && (memcmp (atr, atr_bskyb_new, atr_size) == 0))
    743743    {
    744         cs_log("[videoguard2-reader] type: VideoGuard BSkyB - New");
     744        cs_ri_log("[videoguard2-reader] type: VideoGuard BSkyB - New");
    745745    }
    746746    else if ((atr_size == sizeof (atr_skyitalia)) && (memcmp (atr, atr_skyitalia, atr_size) == 0))
    747747    {
    748         cs_log("[videoguard2-reader] type: VideoGuard Sky Italia");
     748        cs_ri_log("[videoguard2-reader] type: VideoGuard Sky Italia");
    749749    }
    750750    else if ((atr_size == sizeof (atr_directv)) && (memcmp (atr, atr_directv, atr_size) == 0))
    751751    {
    752         cs_log("[videoguard2-reader] type: VideoGuard DirecTV");
     752        cs_ri_log("[videoguard2-reader] type: VideoGuard DirecTV");
    753753    }
    754754    else if ((atr_size == sizeof (atr_yes)) && (memcmp (atr, atr_yes, atr_size) == 0))
    755755    {
    756         cs_log("[videoguard2-reader] type: VideoGuard YES DBS Israel");
     756        cs_ri_log("[videoguard2-reader] type: VideoGuard YES DBS Israel");
    757757    }
    758758    else if ((atr_size == sizeof (atr_viasat_new)) && (memcmp (atr, atr_viasat_new, atr_size) == 0))
    759759    {
    760         cs_log("[videoguard2-reader] type: VideoGuard Viasat new (093E)");
     760        cs_ri_log("[videoguard2-reader] type: VideoGuard Viasat new (093E)");
    761761                BASEYEAR = 2000;
    762762    }
    763763    else if ((atr_size == sizeof (atr_viasat_scandinavia)) && (memcmp (atr, atr_viasat_scandinavia, atr_size) == 0))
    764764    {
    765         cs_log("[videoguard2-reader] type: VideoGuard Viasat Scandinavia");
     765        cs_ri_log("[videoguard2-reader] type: VideoGuard Viasat Scandinavia");
    766766                BASEYEAR = 2000;
    767767    }
    768768    else if ((atr_size == sizeof (atr_skyitalia93b)) && (memcmp (atr, atr_skyitalia93b, atr_size) == 0))
    769769    {
    770         cs_log("[videoguard2-reader] type: VideoGuard Sky Italia new (093B)");
     770        cs_ri_log("[videoguard2-reader] type: VideoGuard Sky Italia new (093B)");
    771771    }
    772772    else if ((atr_size == sizeof (atr_premiere)) && (memcmp (atr, atr_premiere, atr_size) == 0))
    773773    {
    774         cs_log("[videoguard2-reader] type: VideoGuard Sky Germany");
     774        cs_ri_log("[videoguard2-reader] type: VideoGuard Sky Germany");
    775775    }
    776776    else if ((atr_size == sizeof (atr_kbw)) && (memcmp (atr, atr_kbw, atr_size) == 0))
    777777    {
    778         cs_log("[videoguard2-reader] type: VideoGuard Kabel BW");
     778        cs_ri_log("[videoguard2-reader] type: VideoGuard Kabel BW");
    779779    }
    780780    else if ((atr_size == sizeof (atr_get)) && (memcmp (atr, atr_get, atr_size) == 0))
    781781    {
    782         cs_log("[videoguard2-reader] type: VideoGuard Get Kabel Norway");
     782        cs_ri_log("[videoguard2-reader] type: VideoGuard Get Kabel Norway");
    783783                    BASEYEAR = 2004;
    784784    }
    785785    else if ((atr_size == sizeof (atr_foxtel_90b)) && (memcmp (atr, atr_foxtel_90b, atr_size) == 0))
    786786    {   
    787     cs_log("[videoguard2-reader] type: VideoGuard Foxtel Australia (090b)");
     787    cs_ri_log("[videoguard2-reader] type: VideoGuard Foxtel Australia (090b)");
    788788                BASEYEAR = 2000;           
    789789    }
     
    925925    }
    926926
    927   cs_log("[videoguard2-reader] type: VideoGuard, caid: %04X, serial: %02X%02X%02X%02X, BoxID: %02X%02X%02X%02X",
     927  cs_ri_log("[videoguard2-reader] type: VideoGuard, caid: %04X, serial: %02X%02X%02X%02X, BoxID: %02X%02X%02X%02X",
    928928         reader[ridx].caid[0],
    929929         reader[ridx].hexserial[2],reader[ridx].hexserial[3],reader[ridx].hexserial[4],reader[ridx].hexserial[5],
  • branches/monitor-improvement/utils/CMakeLists.txt

    r1600 r1641  
    184184        if (HAVE_LIBUSB AND HAVE_PTHREAD)
    185185            if (EXISTS ${LIBUSBDIR}/lib/libusb-1.0.a)
    186                 message(STATUS "  static libusb 1.0 found (${LIBUSBDIR}/lib/libusb-1.0.a). Adding smartreader support ")
     186                message(STATUS "Utils: static libusb 1.0 found (${LIBUSBDIR}/lib/libusb-1.0.a). Adding smartreader support ")
    187187                add_definitions ("-DLIBUSB")
    188188                add_definitions ("-I${LIBUSBDIR}/include/")
     
    190190                set_property(TARGET utils_imp_libusb PROPERTY IMPORTED_LOCATION ${LIBUSBDIR}/lib/libusb-1.0.a)
    191191            else (EXISTS ${LIBUSBDIR}/lib/libusb-1.0.a)
    192                 message(STATUS "  static libusb 1.0 not found (${LIBUSBDIR}/lib/libusb-1.0.a). No smartreader support ")
     192                message(STATUS "Utils:  static libusb 1.0 not found (${LIBUSBDIR}/lib/libusb-1.0.a). No smartreader support ")
    193193                unset(HAVE_LIBUSB)
    194194                unset(HAVE_LIBRT)
     
    196196            endif (EXISTS ${LIBUSBDIR}/lib/libusb-1.0.a)
    197197        else (HAVE_LIBUSB AND HAVE_PTHREAD)
    198             message(STATUS "  no libusb 1.0 found. No smartreader support")
     198            message(STATUS "Utils: no libusb 1.0 found. No smartreader support")
    199199        endif (HAVE_LIBUSB AND HAVE_PTHREAD)
    200200    else (LIBUSBDIR)
     
    202202        if (HAVE_LIBUSB AND HAVE_PTHREAD)
    203203            if (EXISTS /usr/local/lib/libusb-1.0.a)
    204                 message(STATUS "  static libusb 1.0 found : /usr/local/lib/libusb-1.0.a . Adding smartreader support ")
     204                message(STATUS "Utils: static libusb 1.0 found : /usr/local/lib/libusb-1.0.a . Adding smartreader support ")
    205205                add_definitions ("-DLIBUSB")
    206206                add_definitions ("-I/usr/local/include")
    207207                add_library(utils_imp_libusb STATIC IMPORTED)
    208208                set_property(TARGET utils_imp_libusb PROPERTY IMPORTED_LOCATION /usr/local/lib/libusb-1.0.a)
     209            elseif (EXISTS /usr/lib/libusb-1.0.a)
     210                message(STATUS "Utils: static libusb 1.0 found : /usr/lib/libusb-1.0.a . Adding smartreader support ")
     211                add_definitions ("-DLIBUSB")
     212                add_library(utils_imp_libusb STATIC IMPORTED)
     213                set_property(TARGET utils_imp_libusb PROPERTY IMPORTED_LOCATION /usr/lib/libusb-1.0.a)
    209214            else (EXISTS /usr/local/lib/libusb-1.0.a)
    210                 message(STATUS "  static libusb 1.0 not found (/usr/local/lib/libusb-1.0.a) . No smartreader support ")
     215                message(STATUS "Utils: static libusb 1.0 not found (not in /usr/local/lib/ or /usr/lib/) . No smartreader support ")
    211216                unset(HAVE_LIBUSB)
    212217                unset(HAVE_LIBRT)
     
    220225
    221226
     227if( HAVE_LIBRT OR HAVE_LIBRT_STATIC)
    222228#---- are we building ?
    223229if (HAVE_LIBUSB)
     
    234240add_executable (${util_name} ${exe_srcs} ${exe_hdrs})
    235241
    236 target_link_libraries (${util_name} utils_imp_libusb)
    237 
    238 if(HAVE_LIBRT AND NOT OSCamOperatingSystem MATCHES "Mac OS X")
    239     target_link_libraries (${util_name} rt)
    240 endif(HAVE_LIBRT AND NOT OSCamOperatingSystem MATCHES "Mac OS X")
    241 
    242 if (HAVE_LIBRT_STATIC)
    243     target_link_libraries (${util_name} utils_imp_librt)
    244 endif (HAVE_LIBRT_STATIC)
     242if(HAVE_LIBRT AND HAVE_LIBUSB)
     243    target_link_libraries (${util_name} imp_libusb)
     244    if (NOT OSCamOperatingSystem MATCHES "Mac OS X")
     245        target_link_libraries (${util_name} rt)
     246    endif (NOT OSCamOperatingSystem MATCHES "Mac OS X")
     247endif(HAVE_LIBRT AND HAVE_LIBUSB)
     248
     249if (HAVE_LIBRT_STATIC AND HAVE_LIBUSB)
     250    target_link_libraries (${util_name} imp_libusb)
     251    if (NOT OSCamOperatingSystem MATCHES "Mac OS X")
     252    target_link_libraries (${util_name} imp_librt)
     253    endif (NOT OSCamOperatingSystem MATCHES "Mac OS X")
     254endif (HAVE_LIBRT_STATIC AND HAVE_LIBUSB)
    245255
    246256if (HAVE_PTHREAD)
     
    307317#----------------------- printout resume -----------------------------
    308318
    309 message (STATUS "Utils:  operating system: ${OSCamOperatingSystem}")
    310 message (STATUS "Utils:  system type: ${CS_OSTYPE}")
    311 message (STATUS "Utils:  system: ${CS_OS_SYS}")
    312 message (STATUS "Utils:  cpu: ${CS_OS_CPU}")
    313 message (STATUS "Utils:  hw: ${CS_OS_HW}")
    314 message (STATUS "Utils:  use system static libusb")
     319message (STATUS "Utils: operating system: ${OSCamOperatingSystem}")
     320message (STATUS "Utils: system type: ${CS_OSTYPE}")
     321message (STATUS "Utils: system: ${CS_OS_SYS}")
     322message (STATUS "Utils: cpu: ${CS_OS_CPU}")
     323message (STATUS "Utils: hw: ${CS_OS_HW}")
     324message (STATUS "Utils: use system static libusb")
    315325message (STATUS "")
    316326endif (HAVE_LIBUSB)
     327endif( HAVE_LIBRT OR HAVE_LIBRT_STATIC)
Note: See TracChangeset for help on using the changeset viewer.