Skip to content

Commit

Permalink
Zowe Suite v2.16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zowe-robot committed May 2, 2024
2 parents a4c134c + 863aa63 commit 9dc3de7
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-configmgr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ jobs:
- name: '[Dep 2] Quickjs'
uses: actions/checkout@v3
with:
repository: joenemo/quickjs-portable
repository: JoeNemo/quickjs-portable
path: deps/configmgr/quickjs
ref: 'main'

Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# Zowe Common C Changelog

## `2.16.0`
- No yaml value converted to null (#442)
- Added `zos.getZosVersion()` and `zos.getEsm()` calls for configmgr QJS (#429)
- For correct base64 encoding scheme the buffer size is made to be divisble by 3 (#431).
- Take into account leap seconds in xmem log messages' timestamps (#432, #433)
- Using a temporary buffer pointer to avoid pointer corruption during file write (#437).

## `2.15.0`
- Remove obsolete building script build_configmgr.sh (#410). (#423)
Expand Down
4 changes: 2 additions & 2 deletions build/configmgr.proj.env
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
PROJECT="configmgr"
VERSION=2.15.0
VERSION=2.16.0
DEPS="QUICKJS LIBYAML"

QUICKJS="quickjs"
QUICKJS_SOURCE="git@github.com:joenemo/quickjs-portable.git"
QUICKJS_SOURCE="git@github.com:JoeNemo/quickjs-portable.git"
QUICKJS_BRANCH="main"

LIBYAML="libyaml"
Expand Down
2 changes: 1 addition & 1 deletion build/getesm.proj.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
PROJECT="getesm"
VERSION=2.15.0
VERSION=2.16.0
DEPS=""
2 changes: 1 addition & 1 deletion c/configmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ int cfgSetParmlibMemberName(ConfigManager *mgr, const char *configName, const ch
CFGConfig *config = getConfig(mgr,configName);
if (config){
int len = strlen(parmlibMemberName);
if (len < 3 || len > PARMLIB_MEMBER_MAX){
if (len < 1 || len > PARMLIB_MEMBER_MAX){
return ZCFG_BAD_PARMLIB_MEMBER_NAME;
} else {
config->parmlibMemberName = substring(mgr,(char*)parmlibMemberName,0,len);
Expand Down
5 changes: 3 additions & 2 deletions c/httpfileservice.c
Original file line number Diff line number Diff line change
Expand Up @@ -935,11 +935,12 @@ int writeAsciiDataFromBase64(UnixFile *file, char *fileContents, int contentLeng
&reasonCode);
if (status == 0) {
int writtenLength = 0;
char *currentBufferStart = dataToWrite;
while (dataSize != 0) {
writtenLength = fileWrite(file, dataToWrite, dataSize, &returnCode, &reasonCode);
writtenLength = fileWrite(file, currentBufferStart, dataSize, &returnCode, &reasonCode);
if (writtenLength >= 0) {
dataSize -= writtenLength;
dataToWrite -= writtenLength;
currentBufferStart += writtenLength;
}
else {
zowelog(NULL, LOG_COMP_RESTFILE, ZOWE_LOG_DEBUG, "Error writing to file: return: %d, rsn: %d.\n", returnCode, reasonCode);
Expand Down
41 changes: 41 additions & 0 deletions c/qjszos.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,41 @@ static JSValue zosChangeStreamCCSID(JSContext *ctx, JSValueConst this_val,
return JS_NewInt64(ctx,(int64_t)status);
}

static JSValue getZosVersion(JSContext *ctx, JSValueConst this_val,
int argc, JSValueConst *argv){

#ifdef __ZOWE_OS_ZOS
ECVT *ecvt = getECVT();
int version = ecvt->ecvtpseq;
#else
int version = -1;
#endif
return JS_NewInt64(ctx,(int64_t)version);
}


static JSValue getEsm(JSContext *ctx, JSValueConst this_val,
int argc, JSValueConst *argv){

#ifdef __ZOWE_OS_ZOS
switch(getExternalSecurityManager()) {
case ZOS_ESM_RTSS:
return newJSStringFromNative(ctx, "TSS", 3);
case ZOS_ESM_RACF:
return newJSStringFromNative(ctx, "RACF", 4);
case ZOS_ESM_ACF2:
return newJSStringFromNative(ctx, "ACF2", 4);
case ZOS_ESM_NONE:
return newJSStringFromNative(ctx, "NONE", 4);
default:
return JS_NewString(ctx, NULL);
}
#else
return JS_NewString(ctx, NULL);
#endif

}


/* return [obj, errcode] */
static JSValue zosStat(JSContext *ctx, JSValueConst this_val,
Expand Down Expand Up @@ -377,6 +412,10 @@ static const char changeStreamCCSIDASCII[18] ={ 0x63, 0x68, 0x61, 0x6e, 0x67, 0x
0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x43, 0x53, 0x49, 0x44, 0x00};
static const char zstatASCII[6] ={ 0x7A, 0x73, 0x74, 0x61, 0x74, 0};

static const char getZosVersionASCII[14] ={ 0x67, 0x65, 0x74, 0x5A, 0x6F, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x00};

static const char getEsmASCII[7] = { 0x67, 0x65, 0x74, 0x45, 0x73, 0x6D, 0x00 };

static const char EXTATTR_SHARELIB_ASCII[17] = { 0x45, 0x58, 0x54, 0x41, 0x54, 0x54, 0x52, 0x5f,
0x53, 0x48, 0x41, 0x52, 0x45, 0x4c, 0x49, 0x42, 0x0};

Expand All @@ -398,6 +437,8 @@ static const JSCFunctionListEntry zosFunctions[] = {
JS_CFUNC_DEF(changeExtAttrASCII, 3, zosChangeExtAttr),
JS_CFUNC_DEF(changeStreamCCSIDASCII, 2, zosChangeStreamCCSID),
JS_CFUNC_DEF(zstatASCII, 1, zosStat),
JS_CFUNC_DEF(getZosVersionASCII, 0, getZosVersion),
JS_CFUNC_DEF(getEsmASCII, 0, getEsm),
JS_CFUNC_DEF(dslistASCII, 1, zosDatasetInfo),
JS_CFUNC_DEF(resolveSymbolASCII, 1, zosResolveSymbol),
JS_PROP_INT32_DEF(EXTATTR_SHARELIB_ASCII, EXTATTR_SHARELIB, JS_PROP_CONFIGURABLE ),
Expand Down
4 changes: 3 additions & 1 deletion c/yaml2json.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,9 @@ static bool isSyntacticallyBool(yaml_char_t *data, int length){
}

static bool isSyntacticallyNull(yaml_char_t *data, int length){
if ((length == 1) &&
if (length == 0 ) {
return true;
} else if ((length == 1) &&
!memcmp(data,"~",1)){
return true;
} else if ((length == 4) &&
Expand Down
2 changes: 1 addition & 1 deletion manifest.template.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: zowe-common-c

version: 2.15.0
version: 2.16.0

homepage: https://zowe.org
keywords:
Expand Down

0 comments on commit 9dc3de7

Please sign in to comment.