Commit 3c0ae261 authored by Claes Sjofors's avatar Claes Sjofors

Bugfix in Connect wb method, couldn't handle array element attributes

parent bf5248bc
...@@ -127,8 +127,20 @@ static pwr_tStatus Connect ( ...@@ -127,8 +127,20 @@ static pwr_tStatus Connect (
mb.MethodArguments[0], (char *) &ip->Selected[0].Objid, sizeof(ip->Selected[0].Objid)); mb.MethodArguments[0], (char *) &ip->Selected[0].Objid, sizeof(ip->Selected[0].Objid));
else { else {
// Assume RtBody or SysBody // Assume RtBody or SysBody
sts = ldh_GetAttrRef(ip->PointedSession, ip->Pointed.Objid, char *aname_p;
mb.MethodArguments[0], &PattrRef); pwr_tAName aname;
int size;
sts = ldh_AttrRefToName( ip->PointedSession, &ip->Pointed, ldh_eName_ArefVol, &aname_p, &size);
if ( EVEN(sts)) return 0;
strncpy( aname, aname_p, sizeof(aname));
strcat( aname, ".");
strcat( aname, mb.MethodArguments[0]);
sts = ldh_NameToAttrRef( ip->PointedSession, aname, &PattrRef);
//sts = ldh_GetAttrRef(ip->PointedSession, ip->Pointed.Objid,
// mb.MethodArguments[0], &PattrRef);
if (ODD(sts)) if (ODD(sts))
sts = ldh_WriteAttribute(ip->PointedSession, &PattrRef, &ip->Selected[0].Objid, sts = ldh_WriteAttribute(ip->PointedSession, &PattrRef, &ip->Selected[0].Objid,
sizeof(pwr_tObjid)); sizeof(pwr_tObjid));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment