In osrf_json_gateway.c: added the const qualifier to three
authorscottmk <scottmk@9efc2488-bf62-4759-914b-345cdb29e865>
Sun, 13 Sep 2009 01:51:12 +0000 (01:51 +0000)
committerscottmk <scottmk@9efc2488-bf62-4759-914b-345cdb29e865>
Sun, 13 Sep 2009 01:51:12 +0000 (01:51 +0000)
different local variables, all named "str".

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1781 9efc2488-bf62-4759-914b-345cdb29e865

src/gateway/osrf_json_gateway.c

index 3308028..5701ff0 100644 (file)
@@ -242,7 +242,7 @@ static int osrf_json_gateway_method_handler (request_rec *r) {
                if(!strcasecmp(input_format, "json")) {
                        jsonObject * arr = jsonNewObject(NULL);
 
-                       char* str;
+                       const char* str;
                        int i = 0;
 
                        while( (str = osrfStringArrayGetString(mparams, i++)) ) 
@@ -258,7 +258,7 @@ static int osrf_json_gateway_method_handler (request_rec *r) {
                        if(!strcasecmp(input_format, "xml")) {
                                jsonObject* jsonParams = jsonNewObject(NULL);
 
-                               char* str;
+                               const char* str;
                                int i = 0;
                                while( (str = osrfStringArrayGetString(mparams, i++)) ) {
                                        jsonObjectPush(jsonParams, jsonXMLToJSONObject(str));
@@ -286,7 +286,7 @@ static int osrf_json_gateway_method_handler (request_rec *r) {
                if(!authtoken) authtoken = "";
                growing_buffer* act = buffer_init(128); 
                buffer_fadd(act, "[%s] [%s] [%s] %s %s", r->connection->remote_ip, authtoken, osrf_locale, service, method );
-               char* str; int i = 0;
+               const char* str; int i = 0;
                while( (str = osrfStringArrayGetString(mparams, i++)) ) {
                        if( i == 1 ) {
                                OSRF_BUFFER_ADD(act, " ");