Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
bc47ad44
Commit
bc47ad44
authored
Jul 19, 2016
by
Uwe Schulzweida
Browse files
cdi_get_attsp: check txCode of objID.
parent
ac2ae74c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/vlist_att.c
View file @
bc47ad44
...
...
@@ -15,6 +15,9 @@
#include
"vlist_att.h"
#include
"error.h"
#include
"serialize.h"
#include
"grid.h"
#include
"resource_unpack.h"
static
cdi_atts_t
*
get_attsp
(
vlist_t
*
vlistptr
,
int
varID
)
...
...
@@ -97,13 +100,18 @@ void fill_att(cdi_att_t *attp, int indtype, int exdtype, size_t nelems, size_t x
static
cdi_atts_t
*
cdi_get_attsp
(
int
objID
,
int
varID
)
{
//printf("ObjID %d TxCode: %d\n", objID, reshGetTxCode(objID));
int
vlistID
=
objID
;
vlist_t
*
vlistptr
=
vlist_to_pointer
(
vlistID
);
cdi_atts_t
*
attsp
=
NULL
;
cdi_atts_t
*
attsp
=
get_attsp
(
vlistptr
,
varID
);
if
(
varID
==
CDI_GLOBAL
&&
reshGetTxCode
(
objID
)
==
GRID
)
{
grid_t
*
gridptr
=
gridID2Ptr
(
objID
);
attsp
=
&
gridptr
->
atts
;
}
else
{
vlist_t
*
vlistptr
=
vlist_to_pointer
(
objID
);
attsp
=
get_attsp
(
vlistptr
,
varID
);
}
return
attsp
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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