FS-9952: Add blade rpc error response creation

This commit is contained in:
colm authored and Mike Jerris committed 2017-03-22 17:42:50 -04:00
1 parent aeff38c165
commit 8e417220d3
3 files changed
+33 -1

No files matched your search

+4 -1
View File
@@ -286,7 +286,7 @@ KS_DECLARE(ks_rpcmessageid_t) ks_rpcmessage_create_errorresponse(
cJSON **errorP,
cJSON **responseP)
{
ks_rpcmessageid_t msgid = ks_rpcmessage_new_response(request, errorP, responseP);
ks_rpcmessageid_t msgid = ks_rpcmessage_new_response(request, NULL, responseP);
cJSON *respmsg = *responseP;
if (msgid) {
@@ -296,6 +296,9 @@ KS_DECLARE(ks_rpcmessageid_t) ks_rpcmessage_create_errorresponse(
*errorP = error;
cJSON_AddItemToObject(respmsg, ERROR, error);
}
else if (errorP && *errorP) {
cJSON_AddItemToObject(*responseP, ERROR, *errorP);
}
}
return msgid;