diff --git a/src/moab/MCred.c b/src/moab/MCred.c index 6b891c5..a7d9b0e 100644 --- a/src/moab/MCred.c +++ b/src/moab/MCred.c @@ -1167,18 +1167,28 @@ int MCredProcessConfig( case mcaMaxIJob: - if (L->IP == NULL) - break; + if (L->IP == NULL) + { + L->IP = (mpu_t *)calloc(1,sizeof(mpu_t)); + } - __MCredParseLimit( - ValLine, - &L->IP->SLimit[mptMaxJob][0], - &L->IP->HLimit[mptMaxJob][0]); + if (L->IP != NULL) + { + __MCredParseLimit( + ValLine, + &L->IP->SLimit[mptMaxJob][0], + &L->IP->HLimit[mptMaxJob][0]); + } break; case mcaMaxINode: + if (L->IP == NULL) + { + L->IP = (mpu_t *)calloc(1,sizeof(mpu_t)); + } + if (L->IP != NULL) { __MCredParseLimit( @@ -1191,62 +1201,87 @@ int MCredProcessConfig( case mcaMaxIPE: - if (L->IP == NULL) - break; - - __MCredParseLimit( - ValLine, - &L->IP->SLimit[mptMaxPE][0], - &L->IP->HLimit[mptMaxPE][0]); + if (L->IP == NULL) + { + L->IP = (mpu_t *)calloc(1,sizeof(mpu_t)); + } + if (L->IP != NULL) + { + __MCredParseLimit( + ValLine, + &L->IP->SLimit[mptMaxPE][0], + &L->IP->HLimit[mptMaxPE][0]); + } + break; case mcaMaxIProc: - if (L->IP == NULL) - break; + if (L->IP == NULL) + { + L->IP = (mpu_t *)calloc(1,sizeof(mpu_t)); + } + + if (L->IP != NULL) + { + __MCredParseLimit( + ValLine, + &L->IP->SLimit[mptMaxProc][0], + &L->IP->HLimit[mptMaxProc][0]); + } - __MCredParseLimit( - ValLine, - &L->IP->SLimit[mptMaxProc][0], - &L->IP->HLimit[mptMaxProc][0]); - break; case mcaMaxIPS: - if (L->IP == NULL) - break; + if (L->IP == NULL) + { + L->IP = (mpu_t *)calloc(1,sizeof(mpu_t)); + } + + if (L->IP != NULL) + { + __MCredParseLimit( + ValLine, + &L->IP->SLimit[mptMaxPS][0], + &L->IP->HLimit[mptMaxPS][0]); + } - __MCredParseLimit( - ValLine, - &L->IP->SLimit[mptMaxPS][0], - &L->IP->HLimit[mptMaxPS][0]); - break; case mcaMaxIWC: - if (L->IP == NULL) - break; + if (L->IP == NULL) + { + L->IP = (mpu_t *)calloc(1,sizeof(mpu_t)); + } + + if (L->IP != NULL) + { + __MCredParseLimit( + ValLine, + &L->IP->SLimit[mptMaxWC][0], + &L->IP->HLimit[mptMaxWC][0]); + } - __MCredParseLimit( - ValLine, - &L->IP->SLimit[mptMaxWC][0], - &L->IP->HLimit[mptMaxWC][0]); - break; case mcaMaxIMem: - if (L->IP == NULL) - break; + if (L->IP == NULL) + { + L->IP = (mpu_t *)calloc(1,sizeof(mpu_t)); + } + + if (L->IP != NULL) + { + __MCredParseLimit( + ValLine, + &L->IP->SLimit[mptMaxMem][0], + &L->IP->HLimit[mptMaxMem][0]); + } - __MCredParseLimit( - ValLine, - &L->IP->SLimit[mptMaxMem][0], - &L->IP->HLimit[mptMaxMem][0]); - break; case mcaOMaxJob: