Changeset 1739


Ignore:
Timestamp:
Feb 28, 2010, 8:24:23 AM (10 years ago)
Author:
merek
Message:

Merge from UMP r1806 - dingo35: Autodetect boxtype for DVBAPI

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/globals.h

    r1725 r1739  
    699699    int     dvbapi_au;
    700700    char        dvbapi_usr[33];
    701     char        dvbapi_boxtype[20];
    702701    char        dvbapi_priority[64];
    703702    char        dvbapi_ignore[64];
  • trunk/module-dvbapi.c

    r1676 r1739  
    2222
    2323#include "globals.h"
     24#include "oscam-config.h"
    2425
    2526#define BUFSIZE 512
     
    277278    else
    278279    {
    279         if (strcmp(cfg->dvbapi_boxtype, "ufs910")==0 || strcmp(cfg->dvbapi_boxtype, "dbox2")==0)
     280#ifdef TUXBOX
     281        if (cs_hw==CS_HW_DREAM)
     282            ca_offset=0;
     283        else
     284#endif
    280285            ca_offset=1;
    281286
     
    10671072    }
    10681073
    1069     if (cfg->dvbapi_boxtype[0]==0) {
    1070         strncpy(cfg->dvbapi_boxtype, "dreambox", sizeof(cfg->dvbapi_boxtype)-1);
    1071         cs_log("dvbapi: boxtype not set. Assume boxtype=%s.", cfg->dvbapi_boxtype);
    1072     } else
    1073         cs_log("dvbapi: boxtype=%s.", cfg->dvbapi_boxtype);
    1074 
    10751074    for (i=0;i<MAX_DEMUX;i++)
    10761075    {
  • trunk/oscam-config.c

    r1730 r1739  
    10601060    if (!strcmp(token, "au")) {
    10611061        cfg->dvbapi_au = atoi(value);
    1062         return;
    1063     }
    1064 
    1065     if (!strcmp(token, "boxtype")) {
    1066         cs_strncpy(cfg->dvbapi_boxtype, value, sizeof(cfg->dvbapi_boxtype));
    10671062        return;
    10681063    }
     
    17371732        fprintf_conf(f, CONFVARWIDTH, "enabled", "%d\n", cfg->dvbapi_enabled);
    17381733        fprintf_conf(f, CONFVARWIDTH, "au", "%d\n", cfg->dvbapi_au);
    1739         fprintf_conf(f, CONFVARWIDTH, "boxtype", "%s\n", cfg->dvbapi_boxtype);
    17401734        fprintf_conf(f, CONFVARWIDTH, "user", "%s\n", cfg->dvbapi_usr);
    17411735        fputc((int)'\n', f);
  • trunk/oscam-http.c

    r1707 r1739  
    420420    if (cfg->dvbapi_enabled > 0) tpl_addVar(vars, 0, "ENABLEDCHECKED", "checked");
    421421    if (cfg->dvbapi_au > 0) tpl_addVar(vars, 0, "AUCHECKED", "checked");
    422     tpl_addVar(vars, 0, "BOXTYPE", cfg->dvbapi_boxtype);
    423422    tpl_addVar(vars, 0, "USER", cfg->dvbapi_usr);
    424423
  • trunk/oscam-http.h

    r1693 r1739  
    10251025        <TR><TD>Enabled:</TD><TD><input name=\"enabled\" type=\"checkbox\" value=\"1\" ##ENABLEDCHECKED##>\n\
    10261026        <TR><TD>AU:</TD><TD><input name=\"au\" type=\"checkbox\" value=\"1\" ##AUCHECKED##>\n\
    1027         <TR><TD>Boxtype:</TD><TD><input name=\"boxtype\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"##BOXTYPE##\"></TD></TR>\n\
    10281027        <TR><TD>User:</TD><TD><input name=\"user\" type=\"text\" size=\"20\" maxlength=\"20\" value=\"##USER##\"></TD></TR>\n\
    10291028    <TR><TD colspan=\"2\" align=\"right\"><input type=\"submit\" value=\"OK\">\n</TD></TR>\n\
Note: See TracChangeset for help on using the changeset viewer.