This patch is to illustrate the new parameter retrieval process
of the previos patch
---
plugins/duda/example/hello.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/plugins/duda/example/hello.c b/plugins/duda/example/hello.c
index bb5b19e..33acebd 100644
--- a/plugins/duda/example/hello.c
+++ b/plugins/duda/example/hello.c
@@ -12,6 +12,8 @@
#define PARSE "parse"
#define FORMATTED "formatted"
#define UNFORMATTED "unformatted"
+#define PARAM1 "action"
+#define PARAM2 "format"
DUDA_REGISTER("Service Example", "service");
@@ -155,9 +157,9 @@ void cb_json_second(duda_request_t *dr){
response->http_header(dr, "Content-Type: text/plain", 24);
pnumber = 0;
- pvalue1 = params->get(dr, pnumber);
+ pvalue1 = params->get(dr, PARAM1);
pnumber = 1;
- pvalue2 = params->get(dr, pnumber);
+ pvalue2 = params->get(dr, PARAM2);
if(!pvalue1 || !pvalue2) {
response->body_write(dr, INCORRECT_PARAMETERS, sizeof(INCORRECT_PARAMETERS) - 1);
_______________________________________________
Monkey mailing list
[email protected]
http://lists.monkey-project.com/listinfo/monkey