X-Git-Url: https://rtime.felk.cvut.cz/gitweb/orte.git/blobdiff_plain/fb4333963da906f0c4e053cf1d42a0134d67ffe4..3b7435b13a7df0f58e75eeb0fca137ad0fff879c:/orte/libjorte/JORTEDomainPropDefaultGet.c diff --git a/orte/libjorte/JORTEDomainPropDefaultGet.c b/orte/libjorte/JORTEDomainPropDefaultGet.c index 7045a1a..abe7995 100644 --- a/orte/libjorte/JORTEDomainPropDefaultGet.c +++ b/orte/libjorte/JORTEDomainPropDefaultGet.c @@ -31,30 +31,32 @@ // origin orte headers #include "orte.h" // pregenerated header -#include "jorte/org_ocera_orte_DomainProp.h" - - +#include "jorte/org_ocera_orte_types_DomainProp.h" +#include "jorte/4all.h" JNIEXPORT jint JNICALL -Java_org_ocera_orte_DomainProp_jORTEDomainPropDefaultGet +Java_org_ocera_orte_types_DomainProp_jORTEDomainPropDefaultGet (JNIEnv *env, jclass cls) { ORTEDomainProp *dprop; - /* allocation space for the pointer to struc ORTEDomainProp */ + // memory allocation + // don't forget use free()!! dprop = (ORTEDomainProp *) malloc(sizeof(ORTEDomainProp)); - if (dprop == NULL) { - printf(":!c: not enough of memory to alocation ORTEDomainProp.."); + if (dprop == NULL) + { + printf(":!c: not enough memory to alocate DomainProp!"); return 0; } - - /* call the liborte function */ - if (!ORTEDomainPropDefaultGet(dprop)) { + // call ORTE function + if (!ORTEDomainPropDefaultGet(dprop)) + { printf(":!c: ORTEDomainPropDefaultGet() failed.. \n"); free(dprop); return 0; } - printf(":c: ORTEDomainPropDefaultGet() succesful.. %p \n",dprop); + #ifdef TEST_STAGE + printf(":c: default domain properties created.. \n"); + #endif return ((jint) dprop); - }