Changeset 50


Ignore:
Timestamp:
10/26/10 14:25:07 (13 years ago)
Author:
bowman
Message:

Preparations for 0.9.1 RC, misc fixes and cleanup.

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/README.Optimization.txt

    r10 r50  
    75753. Proxy configuration
    7676----------------------
     77
     78Always start from scratch with the auto-generated config. Do not add any options until you understand what they do and
     79you see an actual need from analyzing the logs.
    7780
    7881To get a definitive overview of what the proxy does with each config value (and where it does it), you can start java
     
    17317610-15 seconds (but avoid lower values) to minimize downtime due to shaky connections when there are few cards available.
    174177Keep in mind that whenever a connection is lost one immediate retry is performed, so its usually best to leave this
    175 at 30-60 seconds.
     178at 30-60 seconds. Setting too low may cause connectors to never reconnect.
    176179
    177180<connection-manager> / <default-keepalive-interval>
  • trunk/README.XmlUserManager.txt

    r1 r50  
    2626- The url of the xml file with user definitions. The file should match the auth-config for SimpleUserManager, but
    2727the top level element is ignored. See config/users.example.xml for an example.
    28 Any url can be used, including https/ftp with user:passwd@hostname type auth info. File urls are also accepted.
     28Any url can be used, including https/ftp with user:passwd@hostname type auth info.
     29File urls are also accepted. NOTE: Relative file urls are written with no initial slashes, e.g: file:etc/users.xml
    2930
    3031NOTE: When using a http/https url, it doesn't have to point to an actual static xml file. A php/jsp/asp page that
  • trunk/README.txt

    r46 r50  
    1 Cardservproxy 0.9.1
    2 -------------------
     1Cardservproxy 0.9.1 (See README.0.9.0.txt for features/changes specific to 0.9.x versions)
     2------------------------------------------------------------------------------------------
    33
    44First, in order to avoid the usual confusion about the proxy:
     
    9393
    9494- Define ca-profiles, one for each provider/vendor/card-type (yes if two providers happen to use the same ca-system, two
    95   separate profiles are still required). Ca-profiles can be thought of as virtual cardservers, and will seem to the
     95  separate profiles may still be required). Ca-profiles can be thought of as virtual cardservers, and will seem to the
    9696  clients like single cards (with a potentially infinite capacity). If you have an enigma1 services file (dreambox)
    9797  you can fetch that and place it where the proxy can read it and point it out in the profile definition. This will
     
    102102  only one port is required per profile (or two if you need both newcamd and radegast listeners), but it is now
    103103  possible to have an arbitrary number of listen ports for the same profile, complete with their own accept/deny lists
    104   and other protocol-specific settings.
     104  and other protocol-specific settings. If it is a satellite setup for mgcamd clients alone, you can create profiles
     105  without ports and use the combined extended-newcamd listen port (top of the generated config) to access all profiles.
    105106
    106107- Define cws-connectors for each cardserver that the proxy should connect to. Use one newcamd-connector or
  • trunk/changelog.txt

    r46 r50  
    22------------------------
    33
    4 0.9.1 - RC0
     40.9.1 - RC0 (see README.0.9.0.txt for conceptual changes and tips)
    55
    66- Fixed: Handling for unknown sid (0 or a dummy sid listed in dummy-services) was broken in 0.9.0.
    77- Fixed: Incoming requests for dummy sids should not retain the dummy when forwarded, now changed to 0.
    88- Fixed: Per profile max-cw-wait could not be set below 1s (now both per profile and global allow down to 100 ms).
     9  NOTE: While it may now be possible to configure such low values, whether it works or not below 1s is still undefined.
    910- Fixed: Probing was sometimes attempted even when there was only one candidate connector.
    1011- Fixed: Radegast support updated to make sense with 0.9.x.
    1112- Fixed: Emm handling for extended newcamd in systems with signifcant provider-idents.
     13- Fixed: Now possible to move messages between profiles from plugins, changes to networkid/caid were previously ignored.
    1214- Changed: Two ecms (or dcw replies) with the same payload data but different dvb table ids (even/0x80 vs odd/0x81) are
    1315  now considered identical by the proxy. Implications unknown.
  • trunk/src/com/bowman/cardserv/CardServProxy.java

    r44 r50  
    363363          return;
    364364        }
     365      } else { // allow plugins to move messages to other profiles regardless of origin
     366        profile = config.getProfileById(msg.getNetworkId(), msg.getCaId());
     367        if(profile == null) profile = session.getProfile();
    365368      }
    366369      msg.setProfileName(profile.getName()); // just a lookup shortcut for all remaining processing
  • trunk/src/com/bowman/cardserv/SidCacheLinker.java

    r46 r50  
    183183      sCmd = new StatusCommand("required-services", "List required services", "List services that need to be permanently in cache for the sid linker to work", false);
    184184      sCmd.register(this);
     185
     186      sCmd = new StatusCommand("linked-services", "List linked services", "List all services that have been configured for sid-cache-linking", false);
     187      sCmd.register(this);
    185188    } catch (NoSuchMethodException e) {
    186189      e.printStackTrace();
     
    257260        xb.appendElement("link").appendAttr("id", i + 1).endElement(false);
    258261        xb.appendElement("required");
    259         XmlHelper.xmlFormatServices(new TvService[] {services[i]}, xb, false, true, false, null, profiles);
     262        XmlHelper.xmlFormatServices(new TvService[] {services[i]}, xb, false, true, true, null, profiles);
    260263        xb.closeElement("required");
    261264        xb.appendElement("opens");
    262         XmlHelper.xmlFormatServices((TvService[])opens.toArray(new TvService[opens.size()]), xb, false, true, false, null, profiles);
     265        XmlHelper.xmlFormatServices((TvService[])opens.toArray(new TvService[opens.size()]), xb, false, true, true, null, profiles);
    263266        xb.closeElement("opens");
    264267        xb.closeElement("link");
     
    266269    }
    267270    xb.closeElement("required-services");
     271  }
     272
     273  public void runStatusCmdLinkedServices(XmlStringBuffer xb, Map params, String user) {
     274    String[] profiles = (String[])params.get("profiles");
     275    Set linkStrs = new TreeSet();
     276    Set set; int i = 0;
     277    xb.appendElement("linked-services", "count", sidLinksMap.values().size());
     278    for(Iterator iter = sidLinksMap.values().iterator(); iter.hasNext(); ) {
     279      set = (Set)iter.next();
     280      if(!linkStrs.contains(set.toString())) {
     281        xb.appendElement("link").appendAttr("id", (i++) + 1).endElement(false);
     282        XmlHelper.xmlFormatServices(toTvServiceArray(set), xb, false, true, true, null, profiles);
     283        xb.closeElement("link");
     284        linkStrs.add(set.toString());
     285      }
     286    }
     287    xb.closeElement("linked-services");
     288  }
     289
     290  private TvService[] toTvServiceArray(Set set) {
     291    TvService[] ts = new TvService[set.size()];
     292    SidEntry se; int i = 0; ServiceMapping sm;
     293    for(Iterator iter = set.iterator(); iter.hasNext(); ) {
     294      se = (SidEntry)iter.next();
     295      ts[i] = config.getService(se.profileName, se.serviceId);
     296      sm = new ServiceMapping(se.serviceId, 0);
     297      sm.setProviderIdent(ServiceMapping.NO_PROVIDER);
     298      ts[i].setCustomData(sm.getCustomData());
     299      i++;
     300    }
     301    return ts;
    268302  }
    269303
     
    424458  private void reportAddedService(CamdNetMessage req, CamdNetMessage origReq) {
    425459    String profileName = req.getProfileName();
    426     TvService ts1 = config.getService(profileName, origReq.getServiceId());
     460    TvService ts1 = config.getService(profileName, origReq.getServiceId());   
    427461    Set services = (Set)requiredServices.get(ts1);
    428462    if(services == null) services = new TreeSet();
     
    430464    if(ts1.equals(ts2)) return;
    431465    services.add(ts2);
     466    ServiceMapping sm = new ServiceMapping(req);
     467    ts2.setCustomData(sm.getCustomData()); // make sure full custom data shows up in the status cmd xml views
     468    ts1.setCustomData(new ServiceMapping(origReq).getCustomData());
    432469    requiredServices.put(ts1, services); // required service -> all otherwise undecodable services that it unlocks
    433470
    434471    services = (Set)addedServices.get(profileName);
    435472    if(services == null) services = new TreeSet();
    436     if(services.add(new ServiceMapping(req))) {
     473    if(services.add(sm)) {
    437474      logger.info("Linked previously undecodable service: " + ts2 + " (unlocked by: " + ts1 + ")");
    438475      // config.getConnManager().cwsFoundService(null, ts2);  // todo
Note: See TracChangeset for help on using the changeset viewer.