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=1c8cb9fe2c33194d09a20ba9566106067b53ce1e;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 364c875..f473e47 100644 --- a/src/libopensrf/osrf_message.c +++ b/src/libopensrf/osrf_message.c @@ -458,7 +458,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));