naming: globally unic identifier
[src/app-framework-binder.git] / plugins / samples / HelloWorld.c
index d910692..067365d 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;
@@ -30,7 +30,7 @@ STATIC json_object* pingSample (AFB_request *request) {
     if (len == 0) strcpy (query,"NoSearchQueryList");
     
     // check if we have some post data
-    if (request->post == NULL)  request->post->data="NoData";  
+    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);