summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Schwaer2015-05-08 14:39:03 +0200
committerStephan Schwaer2015-05-08 14:39:03 +0200
commitf256a4761887b581def7d557ee348452358704bb (patch)
treeda1bacc0e19a13568bc6cfb42176dca1b1ce34bb
parent[SERVER] Rename some more RPC fields (diff)
downloaddnbd3-rpc.tar.gz
dnbd3-rpc.tar.xz
dnbd3-rpc.zip
[SERVER] Renamed image_fillJson to image_getListAsJson.rpc
-rw-r--r--src/server/image.c2
-rw-r--r--src/server/image.h2
-rw-r--r--src/server/rpc.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/server/image.c b/src/server/image.c
index 9259874..9657892 100644
--- a/src/server/image.c
+++ b/src/server/image.c
@@ -1136,7 +1136,7 @@ bool image_generateCrcFile(char *image)
return true;
}
-json_t* image_fillJson()
+json_t* image_getListAsJson()
{
json_t *imagesJson = json_array();
json_t *image;
diff --git a/src/server/image.h b/src/server/image.h
index c7e2b6f..6e96bc9 100644
--- a/src/server/image.h
+++ b/src/server/image.h
@@ -40,7 +40,7 @@ bool image_create(char *image, int revision, uint64_t size);
bool image_generateCrcFile(char *image);
-json_t* image_fillJson();
+json_t* image_getListAsJson();
int image_getCompletenessEstimate(const dnbd3_image_t * const image);
diff --git a/src/server/rpc.c b/src/server/rpc.c
index f010e73..b709b94 100644
--- a/src/server/rpc.c
+++ b/src/server/rpc.c
@@ -26,7 +26,7 @@ void rpc_sendStatsJson(int sock)
json_t *statisticsJson = json_pack( "{sIsI}", "bytesReceived", (json_int_t) bytesReceived, "bytesSent", (json_int_t) bytesSent );
json_object_set_new( statisticsJson, "clients", jsonClients );
- json_object_set_new( statisticsJson, "images", image_fillJson() );
+ json_object_set_new( statisticsJson, "images", image_getListAsJson() );
json_object_set_new( statisticsJson, "uptime", json_integer( uptime ) );
char *jsonString = json_dumps( statisticsJson, 0 );