X-Git-Url: http://www.project-moonshot.org/gitweb/?p=trust_router.git;a=blobdiff_plain;f=mon%2Fmon_req_encode.c;h=12e408c8f8e5b06a7a8c1bf814ece79ee0a6c13a;hp=5bcf8b2c0ae4b9a25810566d8e21ea3318ae15ed;hb=HEAD;hpb=547fc620bfb088fbc35d7301dc52251d7818f4ea diff --git a/mon/mon_req_encode.c b/mon/mon_req_encode.c index 5bcf8b2..12e408c 100644 --- a/mon/mon_req_encode.c +++ b/mon/mon_req_encode.c @@ -39,7 +39,7 @@ #include -// Monitoring request encoders +/* Monitoring request encoders */ /** * Encode options array as a JSON array @@ -54,7 +54,7 @@ * @param opts array of options * @return reference to a JSON array of options */ -static json_t *mon_opts_decode(GArray *opts) +static json_t *mon_opts_encode(GArray *opts) { json_t *array_json = json_array(); // the array of options json_t *opt_json = NULL; // individual option JSON object @@ -142,7 +142,7 @@ json_t *mon_req_encode(MON_REQ *req) /* If we have options, add them to the object */ if (req->options->len > 0) { - opts_json = mon_opts_decode(req->options); + opts_json = mon_opts_encode(req->options); if (opts_json == NULL) { json_decref(req_json); return NULL;