Skip to content

Commit d8e68d7

Browse files
committed
Fixing merge issues
1 parent 334d65b commit d8e68d7

File tree

7 files changed

+30
-30
lines changed

7 files changed

+30
-30
lines changed

source/clientserver/protocolXML2Put.cpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@
1818

1919
static int recursiveDepthPut = 0; // Keep count of recursive calls
2020

21-
int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, USERDEFINEDTYPELIST* userdefinedtypelist,
22-
USERDEFINEDTYPE* userdefinedtype, void** data, int datacount, int structRank,
21+
int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* log_struct_list,
22+
USERDEFINEDTYPELIST* userdefinedtypelist, USERDEFINEDTYPE* userdefinedtype,
23+
void** data, int datacount, int structRank,
2324
int* structShape, int index, NTREE** NTree, int protocolVersion, int malloc_source)
2425
{
2526
// Grow the data tree recursively through pointer elements within individual structures
@@ -1330,19 +1331,19 @@ int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, USERDEFINEDTY
13301331
char* stype;
13311332
void* heap;
13321333
heap = p;
1333-
id = findStructId(heap, &stype);
1334+
id = findStructId(heap, &stype, log_struct_list);
13341335
}
13351336

13361337
if (id == 0) { // Only send/receive new structures
13371338
if (userdefinedtype->compoundfield[j].pointer) {
13381339
rc = rc &&
1339-
xdrUserDefinedData(xdrs, logmalloclist, userdefinedtypelist, utype, (void**)p,
1340+
xdrUserDefinedData(xdrs, logmalloclist, log_struct_list, userdefinedtypelist, utype, (void**)p,
13401341
count, structRank, structShape, i,
13411342
&subNTree,
13421343
protocolVersion, malloc_source); // User Defined type // rc set to 0 somewhere => stops call
13431344
} else {
13441345
rc = rc &&
1345-
xdrUserDefinedData(xdrs, logmalloclist, userdefinedtypelist, utype, (void**)&p,
1346+
xdrUserDefinedData(xdrs, logmalloclist, log_struct_list, userdefinedtypelist, utype, (void**)&p,
13461347
count, structRank, structShape, i,
13471348
&subNTree,
13481349
protocolVersion, malloc_source); // if rc is set to 0 somewhere => stops call
@@ -1432,7 +1433,7 @@ int xdrUserDefinedTypeDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, USERDEFIN
14321433
userdefinedtype); // User Defined Type Definitions
14331434

14341435
rc = rc &&
1435-
xdrUserDefinedDataPut(xdrs, logmalloclist, userdefinedtypelist, userdefinedtype, data, 1, 0, nullptr, 0,
1436+
xdrUserDefinedDataPut(xdrs, logmalloclist, log_struct_list, userdefinedtypelist, userdefinedtype, data, 1, 0, nullptr, 0,
14361437
&dataNTree, protocolVersion, malloc_source); // Data within Structures
14371438

14381439
udaSetFullNTree(dataNTree); // Copy to Global
@@ -1448,7 +1449,7 @@ int xdrUserDefinedTypeDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, USERDEFIN
14481449
userdefinedtype); // User Defined Type Definitions
14491450

14501451
rc = rc &&
1451-
xdrUserDefinedDataPut(xdrs, logmalloclist, userdefinedtypelist, userdefinedtype, data, 1, 0, nullptr, 0,
1452+
xdrUserDefinedDataPut(xdrs, logmalloclist, log_struct_list, userdefinedtypelist, userdefinedtype, data, 1, 0, nullptr, 0,
14521453
nullptr, protocolVersion, malloc_source); // Data within Structures
14531454
/*
14541455
if(!XDRstdioFlag) rc = rc && xdrrec_endofrecord(xdrs, 1);

source/clientserver/protocolXML2Put.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
extern "C" {
1212
#endif
1313

14-
LIBRARY_API int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, USERDEFINEDTYPELIST* userdefinedtypelist,
15-
USERDEFINEDTYPE* userdefinedtype, void** data, int datacount, int structRank,
16-
int* structShape, int index, NTREE** NTree, int protocolVersion,
17-
int malloc_source);
14+
LIBRARY_API int xdrUserDefinedDataPut(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* log_struct_list,
15+
USERDEFINEDTYPELIST* userdefinedtypelist, USERDEFINEDTYPE* userdefinedtype,
16+
void** data, int datacount, int structRank, int* structShape,
17+
int index, NTREE** NTree, int protocolVersion, int malloc_source);
1818

1919
// Send/Receive Array of Structures
2020

source/structures/accessors.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
#ifndef UDA_STRUCTURES_ACCESSORS_H
22
#define UDA_STRUCTURES_ACCESSORS_H
33

4-
#ifdef __cplusplus
5-
extern "C" {
6-
#endif
7-
84
#include <structures/genStructs.h>
95
#include <clientserver/export.h>
106

source/structures/struct.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1883,7 +1883,7 @@ int xdrUserDefinedTypeData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, USERDEFINEDT
18831883
}
18841884

18851885
rc = rc && xdr_userdefinedtype(xdrs, userdefinedtypelist, userdefinedtype); // User Defined Type Definitions
1886-
rc = rc && xdrUserDefinedData(xdrs, logmalloclist, userdefinedtypelist, userdefinedtype, data, 1, 0, nullptr, 0,
1886+
rc = rc && xdrUserDefinedData(xdrs, logmalloclist, log_struct_list, userdefinedtypelist, userdefinedtype, data, 1, 0, nullptr, 0,
18871887
&dataNTree, protocolVersion, malloc_source); // Data within Structures
18881888

18891889
udaSetFullNTree(dataNTree); // Copy to Global
@@ -1896,7 +1896,7 @@ int xdrUserDefinedTypeData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, USERDEFINEDT
18961896
}
18971897

18981898
rc = xdr_userdefinedtype(xdrs, userdefinedtypelist, userdefinedtype); // User Defined Type Definitions
1899-
rc = rc && xdrUserDefinedData(xdrs, logmalloclist, userdefinedtypelist, userdefinedtype, data, 1, 0, nullptr, 0,
1899+
rc = rc && xdrUserDefinedData(xdrs, logmalloclist, log_struct_list, userdefinedtypelist, userdefinedtype, data, 1, 0, nullptr, 0,
19001900
nullptr, protocolVersion, malloc_source); // Data within Structures
19011901

19021902
if (!xdr_stdio_flag) {

source/structures/struct.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ LIBRARY_API void printSarray(SARRAY str);
4242
* @param node A NTREE node to add.
4343
* @return void.
4444
*/
45-
LIBRARY_API void addNTreeList(LOGMALLOCLIST* logmalloclist, NTREE* node);
45+
LIBRARY_API void addNTreeList(LOGMALLOCLIST* logmalloclist, NTREE* node, NTREELIST* ntree_list);
4646

4747
/** Add an NTREE node to an array of child nodes.
4848
*
@@ -329,7 +329,7 @@ findMalloc2(LOGMALLOCLIST* logmalloclist, void* heap, int* count, int* size, con
329329
* @param type The name of the type allocated.
330330
* @return void.
331331
*/
332-
LIBRARY_API void addStruct(void* heap, const char* type);
332+
LIBRARY_API void addStruct(void* heap, const char* type, LOGSTRUCTLIST* log_struct_list);
333333

334334
/** Free allocated heap memory and reinitialise a new LOGSTRUCTLIST. There are no arguments.
335335
*
@@ -343,15 +343,15 @@ LIBRARY_API void freeLogStructList(LOGSTRUCTLIST* log_struct_list);
343343
* @param type The returned structure type.
344344
* @return The structure id.
345345
*/
346-
LIBRARY_API int findStructId(void* heap, char** type);
346+
LIBRARY_API int findStructId(void* heap, char** type, LOGSTRUCTLIST* log_struct_list);
347347

348348
/** Find the Heap address and Data Type of a specific Structure.
349349
*
350350
* @param id The structure id.
351351
* @param type The returned structure type.
352352
* @return The heap memory location
353353
*/
354-
LIBRARY_API void* findStructHeap(int id, char** type);
354+
LIBRARY_API void* findStructHeap(int id, char** type, LOGSTRUCTLIST* log_struct_list);
355355

356356
/** Copy a User Defined Structure Definition.
357357
*
@@ -988,7 +988,7 @@ LIBRARY_API void initNTree(NTREE* str);
988988
* @return void.
989989
*/
990990

991-
LIBRARY_API void initNTreeList();
991+
LIBRARY_API void initNTreeList(NTREELIST* ntree_list);
992992

993993
/** Print the Contents of a tree node to a specified File Descriptor.
994994
*

source/structures/xdrUserDefinedData.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313

1414
static int recursiveDepth = 0; // Keep count of recursive calls
1515

16-
int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, USERDEFINEDTYPELIST* userdefinedtypelist,
17-
USERDEFINEDTYPE* userdefinedtype, void** data, int datacount, int structRank, int* structShape,
16+
int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* log_struct_list,
17+
USERDEFINEDTYPELIST* userdefinedtypelist, USERDEFINEDTYPE* userdefinedtype,
18+
void** data, int datacount, int structRank, int* structShape,
1819
int index, NTREE** NTree, int protocolVersion, int malloc_source)
1920
{
2021
// Grow the data tree recursively through pointer elements within individual structures
@@ -1384,17 +1385,19 @@ int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, USERDEFINEDTYPEL
13841385
char* stype;
13851386
void* heap;
13861387
heap = p;
1387-
id = findStructId(heap, &stype);
1388+
id = findStructId(heap, &stype, log_struct_list);
13881389
}
13891390

13901391
if (id == 0) { // Only send/receive new structures
13911392
if (userdefinedtype->compoundfield[j].pointer) {
1392-
rc = rc && xdrUserDefinedData(xdrs, logmalloclist, userdefinedtypelist, utype,
1393+
rc = rc && xdrUserDefinedData(xdrs, logmalloclist, log_struct_list,
1394+
userdefinedtypelist, utype,
13931395
(void**)p, count,
13941396
structRank, structShape, i, &subNTree, protocolVersion,
13951397
malloc_source);
13961398
} else {
1397-
rc = rc && xdrUserDefinedData(xdrs, logmalloclist, userdefinedtypelist, utype,
1399+
rc = rc && xdrUserDefinedData(xdrs, logmalloclist, log_struct_list,
1400+
userdefinedtypelist, utype,
13981401
(void**)&p, count,
13991402
structRank, structShape, i, &subNTree, protocolVersion,
14001403
malloc_source);

source/structures/xdrUserDefinedData.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
extern "C" {
1111
#endif
1212

13-
LIBRARY_API int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, USERDEFINEDTYPELIST* userdefinedtypelist,
14-
USERDEFINEDTYPE* userdefinedtype, void** data, int datacount, int structRank,
15-
int* structShape,
13+
LIBRARY_API int xdrUserDefinedData(XDR* xdrs, LOGMALLOCLIST* logmalloclist, LOGSTRUCTLIST* log_struct_list,
14+
USERDEFINEDTYPELIST* userdefinedtypelist, USERDEFINEDTYPE* userdefinedtype,
15+
void** data, int datacount, int structRank, int* structShape,
1616
int index, NTREE** NTree, int protocolVersion, int malloc_source);
1717

1818
#ifdef __cplusplus

0 commit comments

Comments
 (0)