From: Bill Erickson Date: Fri, 28 Feb 2014 20:07:48 +0000 (-0500) Subject: C max_chunk_size server bits continued X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=5514c02c1dc9bfdd56eeda499e16e5b9d90fc850;p=working%2FOpenSRF.git C max_chunk_size server bits continued Tag messages as osrfResultPartial and osrfResultPartialComplete, consistent with Perl. Signed-off-by: Bill Erickson --- diff --git a/src/libopensrf/osrf_message.c b/src/libopensrf/osrf_message.c index 9de5e0f..e7aae08 100644 --- a/src/libopensrf/osrf_message.c +++ b/src/libopensrf/osrf_message.c @@ -489,7 +489,13 @@ jsonObject* osrfMessageToJSON( const osrfMessage* msg ) { case RESULT: jsonObjectSetKey(json, "type", jsonNewObject("RESULT")); payload = jsonNewObject(NULL); - jsonObjectSetClass(payload,"osrfResult"); + char* cname = "osrfResult"; + if (msg->status_code == OSRF_STATUS_PARTIAL) { + cname = "osrfResultPartial"; + } else if (msg->status_code == OSRF_STATUS_NOCONTENT) { + cname = "osrfResultPartialComplete"; + } + jsonObjectSetClass(payload, cname); jsonObjectSetKey(payload, "status", jsonNewObject(msg->status_text)); snprintf(sc, sizeof(sc), "%d", msg->status_code); jsonObjectSetKey(payload, "statusCode", jsonNewObject(sc));