Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
7d4a69b0
Commit
7d4a69b0
authored
Oct 13, 2020
by
Claes
Committed by
Esteban Blanc
Dec 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wb GetNextAttrRef() bugfix for attrobjects with disableattr
parent
afc88119
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
11 deletions
+29
-11
wb/lib/wb/src/wb_attribute.h
wb/lib/wb/src/wb_attribute.h
+4
-0
wb/lib/wb/src/wb_ldh.cpp
wb/lib/wb/src/wb_ldh.cpp
+2
-2
wb/lib/wb/src/wb_merep.cpp
wb/lib/wb/src/wb_merep.cpp
+14
-7
wb/lib/wb/src/wb_merep.h
wb/lib/wb/src/wb_merep.h
+2
-1
wb/lib/wb/src/wb_volume.cpp
wb/lib/wb/src/wb_volume.cpp
+7
-1
No files found.
wb/lib/wb/src/wb_attribute.h
View file @
7d4a69b0
...
...
@@ -167,6 +167,10 @@ public:
{
return
m_adrep
;
}
void
addFlagsDisableAttr
()
{
m_flags
|=
PWR_MASK_DISABLEATTR
;
}
void
castId
(
pwr_tCastId
*
castid
);
pwr_tDisableAttr
disabled
();
pwr_tCid
adefCid
();
...
...
wb/lib/wb/src/wb_ldh.cpp
View file @
7d4a69b0
...
...
@@ -362,8 +362,8 @@ pwr_tStatus ldh_CreateObject(ldh_tSession session, pwr_tOid* oid,
try
{
wb_name
n
(
name
);
//if (
!n)
//
return n.sts();
if
(
name
&&
!
n
)
return
n
.
sts
();
wb_cdef
cdef
=
sp
->
cdef
(
cid
);
...
...
wb/lib/wb/src/wb_merep.cpp
View file @
7d4a69b0
...
...
@@ -610,7 +610,7 @@ void wb_merep::classVersion(pwr_tStatus* sts, pwr_tCid cid, pwr_tTime* time)
}
void
wb_merep
::
insertCattObject
(
pwr_tStatus
*
sts
,
pwr_tCid
cid
,
wb_adrep
*
adp
,
int
offset
)
pwr_tStatus
*
sts
,
pwr_tCid
cid
,
wb_adrep
*
adp
,
int
offset
,
int
disableattr
)
{
merep_sClassAttrKey
key
;
merep_sClassAttr
*
item
;
...
...
@@ -634,12 +634,12 @@ void wb_merep::insertCattObject(
if
(
ODD
(
*
sts
))
{
// Insert in found item
item
->
offset
[
item
->
numOffset
]
=
offset
+
adp
->
offset
();
item
->
flags
[
item
->
numOffset
++
]
=
adp
->
flags
();
item
->
flags
[
item
->
numOffset
++
]
=
adp
->
flags
()
|
disableattr
;
}
else
{
// Insert a new item
item
=
(
merep_sClassAttr
*
)
tree_Insert
(
sts
,
m_catt_tt
,
&
key
);
item
->
offset
[
item
->
numOffset
]
=
offset
+
adp
->
offset
();
item
->
flags
[
item
->
numOffset
++
]
=
adp
->
flags
();
item
->
flags
[
item
->
numOffset
++
]
=
adp
->
flags
()
|
disableattr
;
}
// Look for class attributes in this class
...
...
@@ -654,7 +654,12 @@ void wb_merep::insertCattObject(
for
(
ad
=
bd
->
adrep
(
sts
);
ODD
(
*
sts
);
adnext
=
ad
->
next
(
sts
),
delete
ad
,
ad
=
adnext
)
{
if
(
ad
->
flags
()
&
PWR_MASK_CLASS
&&
cdh_tidIsCid
(
ad
->
tid
()))
{
insertCattObject
(
sts
,
cid
,
ad
,
offset
+
adp
->
offset
());
if
(
ad
->
flags
()
&
PWR_MASK_SUPERCLASS
)
insertCattObject
(
sts
,
cid
,
ad
,
offset
+
adp
->
offset
(),
disableattr
);
else
insertCattObject
(
sts
,
cid
,
ad
,
offset
+
adp
->
offset
(),
ad
->
flags
()
&
PWR_MASK_DISABLEATTR
);
if
(
EVEN
(
*
sts
))
return
;
}
...
...
@@ -692,7 +697,7 @@ void wb_merep::insertCattObject(
adnext
=
ad
->
next
(
sts
),
delete
ad
,
ad
=
adnext
)
{
if
(
ad
->
flags
()
&
PWR_MASK_CLASS
&&
cdh_tidIsCid
(
ad
->
tid
()))
{
insertCattObject
(
sts
,
cid
,
ad
,
offset
+
adp
->
offset
()
+
j
*
adp
->
size
()
/
adp
->
nElement
()
);
offset
+
adp
->
offset
()
+
j
*
adp
->
size
()
/
adp
->
nElement
(),
ad
->
flags
()
&
PWR_MASK_DISABLEATTR
);
if
(
EVEN
(
*
sts
))
return
;
}
...
...
@@ -740,7 +745,8 @@ tree_sTable* wb_merep::buildCatt(pwr_tStatus* sts)
for
(
ad
=
bd
->
adrep
(
sts
);
ODD
(
*
sts
);
adnext
=
ad
->
next
(
sts
),
delete
ad
,
ad
=
adnext
)
{
if
(
ad
->
flags
()
&
PWR_MASK_CLASS
&&
cdh_tidIsCid
(
ad
->
tid
()))
{
insertCattObject
(
sts
,
cid
,
ad
,
0
);
insertCattObject
(
sts
,
cid
,
ad
,
0
,
ad
->
flags
()
&
PWR_MASK_DISABLEATTR
);
if
(
EVEN
(
*
sts
))
throw
wb_error
(
*
sts
);
}
...
...
@@ -776,7 +782,8 @@ tree_sTable* wb_merep::buildCatt(pwr_tStatus* sts)
for
(
ad
=
bd
->
adrep
(
sts
);
ODD
(
*
sts
);
adnext
=
ad
->
next
(
sts
),
delete
ad
,
ad
=
adnext
)
{
if
(
ad
->
flags
()
&
PWR_MASK_CLASS
&&
cdh_tidIsCid
(
ad
->
tid
()))
{
insertCattObject
(
sts
,
cid
,
ad
,
0
);
insertCattObject
(
sts
,
cid
,
ad
,
0
,
ad
->
flags
()
&
PWR_MASK_DISABLEATTR
);
if
(
EVEN
(
*
sts
))
throw
wb_error
(
*
sts
);
}
...
...
wb/lib/wb/src/wb_merep.h
View file @
7d4a69b0
...
...
@@ -109,7 +109,8 @@ public:
void
classVersion
(
pwr_tStatus
*
sts
,
pwr_tCid
cid
,
pwr_tTime
*
time
);
tree_sTable
*
buildCatt
(
pwr_tStatus
*
sts
);
void
insertCattObject
(
pwr_tStatus
*
sts
,
pwr_tCid
cid
,
wb_adrep
*
adp
,
int
offset
);
pwr_tStatus
*
sts
,
pwr_tCid
cid
,
wb_adrep
*
adp
,
int
offset
,
int
disableattr
);
tree_sTable
*
catt_tt
()
{
return
m_catt_tt
;
...
...
wb/lib/wb/src/wb_volume.cpp
View file @
7d4a69b0
...
...
@@ -424,6 +424,8 @@ wb_attribute wb_volume::attribute(const pwr_sAttrRef* arp) const
wb_attribute
a
(
LDH__SUCCESS
,
orep
,
adrep
,
idx
);
if
(
arp
->
Flags
.
b
.
Shadowed
)
a
.
setShadowed
(
true
);
if
(
arp
->
Flags
.
b
.
DisableAttr
)
a
.
addFlagsDisableAttr
();
delete
bdrep
;
orep
->
unref
();
return
a
;
...
...
@@ -1240,12 +1242,14 @@ void wb_volume::nextAref(pwr_tCid cid, pwr_sAttrRef* arp, pwr_sAttrRef* oarp)
*
oarp
=
pwr_cNAttrRef
;
oarp
->
Objid
=
op
->
oid
();
oarp
->
Flags
.
b
.
ObjectAttr
=
1
;
if
(
item
->
flags
[
i
]
&
PWR_MASK_DISABLEATTR
)
oarp
->
Flags
.
b
.
DisableAttr
=
1
;
oarp
->
Offset
=
item
->
offset
[
i
];
oarp
->
Size
=
bd_size
;
oarp
->
Body
=
cdh_cidToBid
(
cid
,
pwr_eBix_rt
);
op
->
unref
();
if
(
item
->
flags
[
0
]
&
PWR_MASK_DISABLEATTR
)
{
if
(
item
->
flags
[
i
]
&
PWR_MASK_DISABLEATTR
)
{
wb_attribute
a
=
attribute
(
oarp
);
if
(
a
.
disabled
())
{
pwr_sAttrRef
aref
=
*
oarp
;
...
...
@@ -1297,6 +1301,8 @@ void wb_volume::nextAref(pwr_tCid cid, pwr_sAttrRef* arp, pwr_sAttrRef* oarp)
*
oarp
=
pwr_cNAttrRef
;
oarp
->
Objid
=
ol
->
oid
();
oarp
->
Flags
.
b
.
ObjectAttr
=
1
;
if
(
item
->
flags
[
0
]
&
PWR_MASK_DISABLEATTR
)
oarp
->
Flags
.
b
.
DisableAttr
=
1
;
oarp
->
Offset
=
item
->
offset
[
0
];
oarp
->
Size
=
bd_size
;
oarp
->
Body
=
cdh_cidToBid
(
cid
,
pwr_eBix_rt
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment