Commit bc47ad44 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

cdi_get_attsp: check txCode of objID.

parent ac2ae74c
......@@ -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;
}
......
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