refactoring (in progress, tbf)
[src/app-framework-binder.git] / plugins / samples / HelloWorld.c
index 2f6dc4d..6c2d0cf 100644 (file)
@@ -20,7 +20,7 @@
 #include "local-def.h"
 
 STATIC json_object* pingSample (AFB_request *request) {
-    static pingcount = 0;
+    static int pingcount = 0;
     json_object *response;
     char query [512];
     int len;
@@ -29,11 +29,8 @@ STATIC json_object* pingSample (AFB_request *request) {
     len = getQueryAll (request, query, sizeof(query));
     if (len == 0) strcpy (query,"NoSearchQueryList");
     
-    // check if we have some post data
-    if (request->post == NULL)  request->post->data="NoData";  
-        
     // return response to caller
-    response = jsonNewMessage(AFB_SUCCESS, "Ping Binder Daemon %d query={%s} PostData: \'%s\' ", pingcount++, query, request->post);
+    response = jsonNewMessage(AFB_SUCCESS, "Ping Binder Daemon %d query={%s}", pingcount++, query);
     
     if (verbose) fprintf(stderr, "%d: \n", pingcount);
     return (response);
@@ -87,7 +84,7 @@ STATIC  AFB_restapi pluginApis[]= {
 PUBLIC AFB_plugin *pluginRegister () {
     AFB_plugin *plugin = malloc (sizeof (AFB_plugin));
     plugin->type  = AFB_PLUGIN_JSON;
-    plugin->info  = "Application Framework Binder Service";
+    plugin->info  = "Minimal Hello World Sample";
     plugin->prefix= "hello";
     plugin->apis  = pluginApis;
     return (plugin);