[Opensrf-commits] r1373 - in trunk: . include include/opensrf src
src/c-apps src/gateway src/libopensrf
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Jul 27 09:06:51 EDT 2008
Author: erickson
Date: 2008-07-27 09:06:45 -0400 (Sun, 27 Jul 2008)
New Revision: 1373
Removed:
trunk/include/objson/
Modified:
trunk/Makefile.am
trunk/include/opensrf/osrfConfig.h
trunk/src/Makefile.am
trunk/src/c-apps/Makefile.am
trunk/src/gateway/Makefile.am
trunk/src/gateway/osrf_json_gateway.c
trunk/src/libopensrf/Makefile.am
trunk/src/libopensrf/Makefile.json
Log:
* remove the objson API compat layer.
* Set the default JSON gateway protocol to non-legacy json
Modified: trunk/Makefile.am
===================================================================
--- trunk/Makefile.am 2008-07-25 15:30:11 UTC (rev 1372)
+++ trunk/Makefile.am 2008-07-27 13:06:45 UTC (rev 1373)
@@ -24,7 +24,7 @@
export APXS2 = @APXS2@
export APACHE2_HEADERS = @APACHE2_HEADERS@
export DEF_CFLAGS = -D_LARGEFILE64_SOURCE $(MAYBE_DEBUG) -pipe -g -Wall -O2 -fPIC -I at abs_top_srcdir@/include/ -I$(LIBXML2_HEADERS) -I$(APACHE2_HEADERS) -I$(APR_HEADERS) @INCLUDES@
-export DEF_LDLIBS = -lobjson -lopensrf
+export DEF_LDLIBS = -lopensrf
export VAR = @localstatedir@
export PID = @localstatedir@/run/opensrf
export SOCK = @localstatedir@/lock/opensrf
@@ -72,10 +72,8 @@
EXTRA_DIST = $(DOC_FILES) $(EXAMPLES_FILES) $(libosrf_FILES) $(strn_compat_FILES) $(python_FILES) $(java_FILES) autogen.sh src/extras src/gateway/fieldmapper-c-xml-out.pl DCO-1.1.txt LICENSE.txt src/perlmods src/javascript
-objsonincludedir = @includedir@/objson
opensrfincludedir = @includedir@/opensrf
-OBJINC=@srcdir@/include/objson
OSRFINC=@srcdir@/include/opensrf
opensrfinclude_HEADERS = $(OSRFINC)/log.h \
@@ -107,7 +105,6 @@
$(OSRFINC)/utils.h \
$(OSRFINC)/xml_utils.h
-objsoninclude_HEADERS = $(OBJINC)/json2xml.h $(OBJINC)/json_parser.h $(OBJINC)/object.h $(OBJINC)/xml2json.h
SUBDIRS = src
Modified: trunk/include/opensrf/osrfConfig.h
===================================================================
--- trunk/include/opensrf/osrfConfig.h 2008-07-25 15:30:11 UTC (rev 1372)
+++ trunk/include/opensrf/osrfConfig.h 2008-07-27 13:06:45 UTC (rev 1373)
@@ -45,11 +45,11 @@
int osrfConfigHasDefaultConfig();
/**
- Replaces the config object's objson object. This is useful
+ Replaces the config object's json object. This is useful
if you have an ojbson object already and not an XML config
file to parse.
@param cfg The config object to alter
- @param obj The objson objet to use when searching values
+ @param obj The json objet to use when searching values
*/
void osrfConfigReplaceConfig(osrfConfig* cfg, const jsonObject* obj);
Modified: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am 2008-07-25 15:30:11 UTC (rev 1372)
+++ trunk/src/Makefile.am 2008-07-27 13:06:45 UTC (rev 1373)
@@ -28,11 +28,6 @@
AM_LDFLAGS = $(DEF_LDFLAGS)
AM_CFLAGS = $(DEF_CFLAGS)
-if BUILDJSON
-LDADD = -lobjson
-BJSON=1
-endif
-
if BUILDPYTHON
MAYBE_PY = python
endif
Modified: trunk/src/c-apps/Makefile.am
===================================================================
--- trunk/src/c-apps/Makefile.am 2008-07-25 15:30:11 UTC (rev 1372)
+++ trunk/src/c-apps/Makefile.am 2008-07-27 13:06:45 UTC (rev 1373)
@@ -19,10 +19,10 @@
lib_LTLIBRARIES = libosrf_dbmath.la libosrf_math.la libosrf_version.la
timejson_SOURCES = timejson.c
-timejson_LDADD = -lobjson -lopensrf
+timejson_LDADD = -lopensrf
libosrf_dbmath_la_SOURCES = osrf_dbmath.c
-libosrf_dbmath_la_LIBADD = -lobjson -lopensrf
+libosrf_dbmath_la_LIBADD = -lopensrf
libosrf_math_la_SOURCES = osrf_math.c
-libosrf_math_la_LIBADD = -lobjson -lopensrf
+libosrf_math_la_LIBADD = -lopensrf
libosrf_version_la_SOURCES = osrf_version.c
-libosrf_version_la_LIBADD = -lobjson -lopensrf
+libosrf_version_la_LIBADD = -lopensrf
Modified: trunk/src/gateway/Makefile.am
===================================================================
--- trunk/src/gateway/Makefile.am 2008-07-25 15:30:11 UTC (rev 1372)
+++ trunk/src/gateway/Makefile.am 2008-07-27 13:06:45 UTC (rev 1373)
@@ -19,9 +19,9 @@
cur_LTLIBRARIES = libosrf_json_gateway.la libosrf_http_translator.la
libosrf_json_gateway_la_SOURCES = apachetools.c apachetools.h osrf_json_gateway.c
-libosrf_json_gateway_la_LIBADD = -lobjson -lopensrf
+libosrf_json_gateway_la_LIBADD = -lopensrf
libosrf_http_translator_la_SOURCES = apachetools.c apachetools.h osrf_http_translator.c
-libosrf_http_translator_la_LIBADD = -lobjson -lopensrf
+libosrf_http_translator_la_LIBADD = -lopensrf
include_HEADERS = apachetools.h
Modified: trunk/src/gateway/osrf_json_gateway.c
===================================================================
--- trunk/src/gateway/osrf_json_gateway.c 2008-07-25 15:30:11 UTC (rev 1372)
+++ trunk/src/gateway/osrf_json_gateway.c 2008-07-27 13:06:45 UTC (rev 1373)
@@ -16,14 +16,9 @@
#define DEFAULT_LOCALE "OSRFDefaultLocale"
#define CONFIG_CONTEXT "gateway"
#define JSON_PROTOCOL "OSRFGatewayLegacyJSON"
-#define GATEWAY_USE_LEGACY_JSON 1
+#define GATEWAY_USE_LEGACY_JSON 0
-/* our config structure */
typedef struct {
- char* configfile; /* our bootstrap config file */
-} osrf_json_gateway_config;
-
-typedef struct {
int legacyJSON;
} osrf_json_gateway_dir_config;
@@ -43,16 +38,13 @@
}
static const char* osrf_json_gateway_set_config(cmd_parms *parms, void *config, const char *arg) {
- osrf_json_gateway_config *cfg;
- cfg = ap_get_module_config(parms->server->module_config, &osrf_json_gateway_module);
- cfg->configfile = (char*) arg;
osrf_json_gateway_config_file = (char*) arg;
return NULL;
}
static const char* osrf_json_gateway_set_json_proto(cmd_parms *parms, void *config, const char *arg) {
osrf_json_gateway_dir_config* cfg = (osrf_json_gateway_dir_config*) config;
- cfg->legacyJSON = (!strcasecmp((char*) arg, "false")) ? 0 : 1;
+ cfg->legacyJSON = (!strcasecmp((char*) arg, "true")) ? 1 : 0;
return NULL;
}
@@ -125,10 +117,9 @@
char* (*jsonToStringFunc) (const jsonObject*) = legacy_jsonObjectToJSON;
if(dir_conf->legacyJSON) {
- ap_log_rerror( APLOG_MARK, APLOG_INFO, 0, r, "Using legacy JSON");
+ ap_log_rerror( APLOG_MARK, APLOG_DEBUG, 0, r, "Using legacy JSON");
} else {
- ap_log_rerror( APLOG_MARK, APLOG_INFO, 0, r, "Not using legacy JSON");
parseJSONFunc = jsonParseString;
jsonToStringFunc = jsonObjectToJSON;
}
Modified: trunk/src/libopensrf/Makefile.am
===================================================================
--- trunk/src/libopensrf/Makefile.am 2008-07-25 15:30:11 UTC (rev 1372)
+++ trunk/src/libopensrf/Makefile.am 2008-07-27 13:06:45 UTC (rev 1373)
@@ -14,7 +14,7 @@
AM_CFLAGS = $(DEF_CFLAGS) -DASSUME_STATELESS -DOSRF_STRICT_PARAMS -rdynamic -fno-strict-aliasing -DOSRF_JSON_ENABLE_XML_UTILS
AM_LDFLAGS = $(DEF_LDFLAGS)
-LDADD = -lxml2 -ldl -lmemcache -lopensrf -lobjson
+LDADD = -lxml2 -ldl -lmemcache -lopensrf
OSRF_INC = @top_srcdir@/include/opensrf
@@ -97,20 +97,11 @@
osrf_json_test_SOURCES = osrf_json_test.c $(JSON_TARGS) $(JSON_DEP) $(JSON_TARGS_HEADS) $(JSON_DEP_HEADS)
noinst_LTLIBRARIES = libosrf_json.la
-lib_LTLIBRARIES = libobjson.la libopensrf.la
+lib_LTLIBRARIES = libopensrf.la
-if BUILDJSON
-libobjson_la_SOURCES = $(JSON_TARGS) $(JSON_DEP) $(JSON_TARGS_HEADS) $(JSON_DEP_HEADS)
-libobjson_la_CFLAGS = $(AM_CFLAGS)
-endif
-
libosrf_json_la_SOURCES = $(JSON_TARGS) $(JSON_DEP) $(JSON_TARGS_HEADS) $(JSON_DEP_HEADS)
libosrf_json_la_CFLAGS = $(AM_CFLAGS)
-if BUILDJSON
-libosrf_json_la_DEPENDENCIES = libobjson.la
-endif
-
libopensrf_la_CFLAGS = $(AM_CFLAGS)
libopensrf_la_DEPENDENCIES = libosrf_json.la
Modified: trunk/src/libopensrf/Makefile.json
===================================================================
--- trunk/src/libopensrf/Makefile.json 2008-07-25 15:30:11 UTC (rev 1372)
+++ trunk/src/libopensrf/Makefile.json 2008-07-27 13:06:45 UTC (rev 1373)
@@ -13,9 +13,6 @@
EXT_TARGETS = osrf_list.o osrf_hash.o utils.o log.o md5.o string_array.o
all: $(TARGETS)
- if [ ! -z "$(OSRF_LEGACY_JSON)" ]; then \
- $(CC) -shared -W1 $(LDFLAGS) $(TARGETS) -o $(TMPDIR)/libobjson.so;\
- fi;
standalone: $(TARGETS) $(EXT_TARGETS)
$(CC) -shared -W1 $(CFLAGS) $(LDFLAGS) $(LDLIBS) $(TARGETS) $(EXT_TARGETS) -o libosrf_json.so
More information about the opensrf-commits
mailing list