Changeset: fb6de70f9819 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fb6de70f9819 Modified Files: clients/Tests/exports.stable.out monetdb5/mal/mal_sabaoth.c monetdb5/mal/mal_sabaoth.h monetdb5/modules/mal/sabaoth.c Branch: default Log Message:
Cleanup: removed some unused SABAOTH functions. diffs (212 lines): diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out --- a/clients/Tests/exports.stable.out +++ b/clients/Tests/exports.stable.out @@ -1639,18 +1639,12 @@ str RUNcostPrediction(Client cntxt, MalB str RUNisolation(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr p); str RUNpickResult(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr p); str RUNvolumeCost(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr p); -str SABAOTHdeserialise(sabdb **ret, str *sabdb); str SABAOTHfreeStatus(sabdb **ret); -str SABAOTHgetDBfarm(str *ret); -str SABAOTHgetDBname(str *ret); str SABAOTHgetLocalConnection(str *ret); str SABAOTHgetMyStatus(sabdb **ret); -str SABAOTHgetStatus(sabdb **ret, str dbname); -str SABAOTHgetUplogInfo(sabuplog *ret, sabdb *db); -str SABAOTHmarchConnection(void *ret, str *host, int *port); -str SABAOTHmarchScenario(void *ret, str *lang); -str SABAOTHretreatScenario(void *ret, str *lang); -str SABAOTHserialise(str *ret, sabdb *db); +str SABAOTHmarchConnection(str *host, int *port); +str SABAOTHmarchScenario(str *lang); +str SABAOTHretreatScenario(str *lang); str SABepilogue(void *ret); str SABgetLocalConnectionHost(str *ret); str SABgetLocalConnectionPort(int *ret); diff --git a/monetdb5/mal/mal_sabaoth.c b/monetdb5/mal/mal_sabaoth.c --- a/monetdb5/mal/mal_sabaoth.c +++ b/monetdb5/mal/mal_sabaoth.c @@ -11,7 +11,7 @@ * Cluster support * The cluster facilitation currently only deals with (de-)registering of * services offered by the local server to other servers. - * The name of this module is inspired by the Armada setting of anchient + * The name of this module is inspired by the Armada setting of ancient * times and origanisational structures. Sabaoth, stands for ``Lord of * Hosts'' in an army setting as found in the Bible's New Testament. This * module allows an army of Mservers to be aware of each other on a local @@ -50,41 +50,14 @@ fromMallocToGDK(char *val) } while (0) /** - * Returns the dbfarm as received during SABAOTHinit. Throws an - * exception if not initialised. - */ -str SABAOTHgetDBfarm(str *ret) { - str dbfarm; - str err = msab_getDBfarm(&dbfarm); - if (err != NULL) - excFromMem(MAL, "sabaoth.getdbfarm", err); - *ret = fromMallocToGDK(dbfarm); - return(MAL_SUCCEED); -} - -/** - * Returns the dbname as received during SABAOTHinit. Throws an - * exception if not initialised or dbname was set to NULL. - */ -str SABAOTHgetDBname(str *ret) { - str dbname; - str err = msab_getDBname(&dbname); - if (err != NULL) - excFromMem(MAL, "sabaoth.getdbname", err); - *ret = fromMallocToGDK(dbname); - return(MAL_SUCCEED); -} - -/** * Writes the given language to the scenarios file. If the file doesn't * exist, it is created. Multiple invocations of this function for the * same language are ignored. */ -str SABAOTHmarchScenario(void *ret, str *lang) { +str SABAOTHmarchScenario(str *lang) { str err = msab_marchScenario(*lang); if (err != NULL) excFromMem(MAL, "sabaoth.marchscenario", err); - (void)ret; return(MAL_SUCCEED); } @@ -93,11 +66,10 @@ str SABAOTHmarchScenario(void *ret, str * file is empty (before or) after removing the language, the file is * removed. */ -str SABAOTHretreatScenario(void *ret, str *lang) { +str SABAOTHretreatScenario(str *lang) { str err = msab_retreatScenario(*lang); if (err != NULL) excFromMem(MAL, "sabaoth.retreatscenario", err); - (void)ret; return(MAL_SUCCEED); } @@ -108,11 +80,10 @@ str SABAOTHretreatScenario(void *ret, st * to <= 0, this function treats the host argument as UNIX domain * socket, in which case host must start with a '/'. */ -str SABAOTHmarchConnection(void *ret, str *host, int *port) { +str SABAOTHmarchConnection(str *host, int *port) { str err = msab_marchConnection(*host, *port); if (err != NULL) excFromMem(MAL, "sabaoth.marchconnection", err); - (void)ret; return(MAL_SUCCEED); } @@ -161,21 +132,6 @@ str SABAOTHgetMyStatus(sabdb** ret) { } /** - * Returns a list of populated sabdb structs. If dbname == NULL, the - * list contains sabdb structs for all found databases in the dbfarm. - * Otherwise, at most one sabdb struct is returned for the database from - * the dbfarm that matches dbname. - * If no database could be found, an empty list is returned. Each list - * is terminated by a NULL entry. - */ -str SABAOTHgetStatus(sabdb** ret, str dbname) { - str err = msab_getStatus(ret, dbname); - if (err != NULL) - excFromMem(MAL, "sabaoth.getstatus", err); - return(MAL_SUCCEED); -} - -/** * Frees up the sabdb structure returned by getStatus. */ str SABAOTHfreeStatus(sabdb** ret) { @@ -184,35 +140,3 @@ str SABAOTHfreeStatus(sabdb** ret) { excFromMem(MAL, "sabaoth.freestatus", err); return(MAL_SUCCEED); } - -/** - * Parses the .uplog file for the given database, and fills ret with the - * parsed information. - */ -str SABAOTHgetUplogInfo(sabuplog *ret, sabdb *db) { - str err = msab_getUplogInfo(ret, db); - if (err != NULL) - excFromMem(MAL, "sabaoth.getuploginfo", err); - return(MAL_SUCCEED); -} - -/** - * Produces a string representation suitable for storage/sending. - */ -str SABAOTHserialise(str *ret, sabdb *db) { - str err = msab_serialise(ret, db); - if (err != NULL) - excFromMem(MAL, "sabaoth.serialise", err); - return(MAL_SUCCEED); -} - -/** - * Produces a sabdb struct out of a serialised string. - */ -str SABAOTHdeserialise(sabdb **ret, str *sdb) { - str err = msab_deserialise(ret, *sdb); - if (err != NULL) - excFromMem(MAL, "sabaoth.deserialise", err); - return(MAL_SUCCEED); -} - diff --git a/monetdb5/mal/mal_sabaoth.h b/monetdb5/mal/mal_sabaoth.h --- a/monetdb5/mal/mal_sabaoth.h +++ b/monetdb5/mal/mal_sabaoth.h @@ -12,16 +12,10 @@ #include <mal.h> #include <mal_exception.h> #include <msabaoth.h> -mal_export str SABAOTHgetDBfarm(str *ret); -mal_export str SABAOTHgetDBname(str *ret); -mal_export str SABAOTHmarchScenario(void *ret, str *lang); -mal_export str SABAOTHretreatScenario(void *ret, str *lang); -mal_export str SABAOTHmarchConnection(void *ret, str *host, int *port); +mal_export str SABAOTHmarchScenario(str *lang); +mal_export str SABAOTHretreatScenario(str *lang); +mal_export str SABAOTHmarchConnection(str *host, int *port); mal_export str SABAOTHgetLocalConnection(str *ret); mal_export str SABAOTHgetMyStatus(sabdb** ret); -mal_export str SABAOTHgetStatus(sabdb** ret, str dbname); mal_export str SABAOTHfreeStatus(sabdb** ret); -mal_export str SABAOTHgetUplogInfo(sabuplog *ret, sabdb *db); -mal_export str SABAOTHserialise(str *ret, sabdb *db); -mal_export str SABAOTHdeserialise(sabdb **ret, str *sabdb); #endif diff --git a/monetdb5/modules/mal/sabaoth.c b/monetdb5/modules/mal/sabaoth.c --- a/monetdb5/modules/mal/sabaoth.c +++ b/monetdb5/modules/mal/sabaoth.c @@ -51,15 +51,18 @@ str SABepilogue(void *ret) { } str SABmarchScenario(void *ret, str *lang){ - return SABAOTHmarchScenario(ret, lang); + (void) ret; + return SABAOTHmarchScenario(lang); } str SABretreatScenario(void *ret, str *lang){ - return SABAOTHretreatScenario(ret, lang); + (void) ret; + return SABAOTHretreatScenario(lang); } str SABmarchConnection(void *ret, str *host, int *port) { - return SABAOTHmarchConnection(ret, host, port); + (void) ret; + return SABAOTHmarchConnection(host, port); } str SABgetLocalConnectionURI(str *ret) { _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list