Skip to content

Commit

Permalink
Zowe Suite v1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zowe-robot authored Oct 15, 2019
2 parents 3d2a915 + f0c3932 commit c9a5f54
Show file tree
Hide file tree
Showing 44 changed files with 7,839 additions and 908 deletions.
431 changes: 431 additions & 0 deletions c/as.c

Large diffs are not rendered by default.

19 changes: 18 additions & 1 deletion c/collections.c
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,24 @@ int stringCompare(void *key1, void *key2){
}

void htDestroy(hashtable *ht){
/* printf("htDestroy should apply all key and value reclaimers, if specified\n"); */

if (ht->keyReclaimer != NULL || ht->valueReclaimer != NULL) {

for (int i = 0; i < ht->backboneSize; i++) {
hashentry *entry = ht->backbone[i];
while (entry != NULL) {
if (ht->keyReclaimer != NULL) {
(ht->keyReclaimer)(entry->key);
}
if (ht->valueReclaimer != NULL) {
(ht->valueReclaimer)(entry->value);
}
entry = entry->next;
}
}

}

fbMgrDestroy(ht->mgr);
safeFree((char*)ht->backbone,sizeof(hashentry*)*ht->backboneSize);
safeFree((char*)ht,sizeof(hashtable));
Expand Down
10 changes: 5 additions & 5 deletions c/crossmemory.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
This program and the accompanying materials are
made available under the terms of the Eclipse Public License v2.0 which accompanies
this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
SPDX-License-Identifier: EPL-2.0
Copyright Contributors to the Zowe Project.
*/

Expand Down Expand Up @@ -3110,7 +3110,7 @@ static void handleAsyncModifyCommand(CrossMemoryServer *server,
(void *)command, commandLength);
wtoPrintf2(consoleID, cart, CMS_LOG_CMD_TKNZ_FAILURE_MSG);
}

SLHFree(slh);
}

static int commandTaskHandler(RLETask *rleTask) {
Expand Down Expand Up @@ -4267,8 +4267,8 @@ void crossmemoryServerDESCTs(){
This program and the accompanying materials are
made available under the terms of the Eclipse Public License v2.0 which accompanies
this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
SPDX-License-Identifier: EPL-2.0
Copyright Contributors to the Zowe Project.
*/
19 changes: 15 additions & 4 deletions c/dataservice.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ static void *lookupDLLEntryPoint(char *libraryName, char *functionName){
return ep;
}

static DataService *makeDataService(WebPlugin *plugin, JsonObject *serviceJsonObject, char *subURI, InternalAPIMap *namedAPIMap) {
static DataService *makeDataService(WebPlugin *plugin, JsonObject *serviceJsonObject, char *subURI, InternalAPIMap *namedAPIMap,
unsigned int *idMultiplier, int pluginLogLevel) {
zowelog(NULL, LOG_COMP_DATASERVICE, ZOWE_LOG_INFO, "%s begin data service:\n", __FUNCTION__);
DataService *service = (DataService*) safeMalloc(sizeof (DataService), "DataService");
memset(service, 0, sizeof (DataService));
Expand All @@ -166,6 +167,11 @@ static DataService *makeDataService(WebPlugin *plugin, JsonObject *serviceJsonOb
} else {
sprintf(service->identifier, "%s", plugin->identifier);
}

service->loggingIdentifier = LOG_PROD_PLUGINS + (0x10000 * (*idMultiplier));
logConfigureComponent(NULL, service->loggingIdentifier, service->identifier,
LOG_DEST_PRINTF_STDOUT, pluginLogLevel);
zowelog(NULL, service->loggingIdentifier, ZOWE_LOG_WARNING, "added identifier for %s\n", service->identifier);

char *initializerLookupMethod = jsonObjectGetString(serviceJsonObject, "initializerLookupMethod");
char *initializerName = jsonObjectGetString(serviceJsonObject, "initializerName");
Expand Down Expand Up @@ -252,7 +258,8 @@ static bool isValidServiceDef(JsonObject *serviceDef) {
return true;
}

WebPlugin *makeWebPlugin(char *pluginLocation, JsonObject *pluginDefintion, InternalAPIMap *internalAPIMap) {
WebPlugin *makeWebPlugin(char *pluginLocation, JsonObject *pluginDefintion, InternalAPIMap *internalAPIMap,
unsigned int *idMultiplier, int pluginLogLevel) {
zowelog(NULL, LOG_COMP_DATASERVICE, ZOWE_LOG_INFO, "%s begin\n", __FUNCTION__);
WebPlugin *plugin = (WebPlugin*)safeMalloc(sizeof(WebPlugin),"WebPlugin");
memset(plugin, 0, sizeof (WebPlugin));
Expand Down Expand Up @@ -298,13 +305,17 @@ WebPlugin *makeWebPlugin(char *pluginLocation, JsonObject *pluginDefintion, Inte
char *type = jsonObjectGetString(serviceDef, "type");

if (!type || !strcmp(type, "service")) {
plugin->dataServices[k++] = makeDataService(plugin, jsonArrayGetObject(dataServices, i), NULL, internalAPIMap);
plugin->dataServices[k++] = makeDataService(plugin, jsonArrayGetObject(dataServices, i), NULL, internalAPIMap,
idMultiplier, pluginLogLevel);
(*idMultiplier++);
} else if (!strcmp(type, "group")) {
char *subURI = jsonObjectGetString(serviceDef, "name");
JsonArray* group = jsonObjectGetArray(serviceDef, "subservices");
if (group) {
for (int j = 0; j < jsonArrayGetCount(group); j++) {
plugin->dataServices[k++] = makeDataService(plugin, jsonArrayGetObject(group, j), subURI, internalAPIMap);
plugin->dataServices[k++] = makeDataService(plugin, jsonArrayGetObject(group, j), subURI, internalAPIMap,
idMultiplier, pluginLogLevel);
(*idMultiplier++);
}
}
} else {
Expand Down
Loading

0 comments on commit c9a5f54

Please sign in to comment.