Hi Denis, On Tue, Sep 08, 2009 at 02:23:51PM +0300, Denis Chapligin wrote: > Hi Dejan, > > On Tue, 8 Sep 2009 12:29:32 +0200 > Dejan Muhamedagic <deja...@fastmail.fm> wrote: > > > > Due to limitations of the MPC device (it doesn't allows to assign > > > same plug name to the different plugs) this plugin uses GROUPS > > > instead of PLUGS. I mean - you have to connect your nodes to the > > > MPC, using one or more plugs, create a group and name it, using a > > > node's uname. Then just add node's plugs to that group. This should > > > be done even for nodes, that use single outlet. > > > > I suppose that resetting a GROUP resets a set of outlets? > > Sure!
Great. Actually, it makes our life much easier compared to resetting all relevant outlets. > > When you say PLUG do you mean outlet? > > Yes, it is a WTI name for the outlet. OK. > > In wti_mpc_set_config() in the outlet counting code the comments > > and the OID name (OID_NUM_OUTLETS) don't match. Can you please > > clarify that. > > Mmm, that is because i've started with outlets, not groups. I switched > to groups later, when i figured that i can't use same name twice. Perhaps I wasn't clear. You increase the outlet count number if the returned value for that OID is not empty. The comments should reflect that and the OID name should be changed. I referred to this loop: 639 for (mo=1;mo<MAX_OUTLETS;mo++) { 640 snprintf(objname,MAX_STRING,OID_NUM_OUTLETS,mo); 641 if ((i = MPC_read(sd->sptr, objname, ASN_OCTET_STR)) == NULL) { 642 LOG(PIL_CRIT 643 , "%s: cannot read number of outlets." 644 , __FUNCTION__); 645 return (S_ACCESS); 646 } 647 if (strlen(i)) { 648 /* store the number of outlets */ 649 sd->num_outlets++; 650 } else { 651 break; 652 } 653 } > > It would be great if you could also put together a short readme > > which would list devices tested and how to configure them for use > > with this plugin. > > Should i make a patch for this issue and comments issue above or just > post it here? A patch would be better. > > The patches are committed to the repository. > > Thanks! Thanks to you for the contribution :) Cheers, Dejan > > -- > Denis Chapligin > _______________________________________________________ > Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org > http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev > Home Page: http://linux-ha.org/ _______________________________________________________ Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev Home Page: http://linux-ha.org/