Added Timeout in Response
[src/app-framework-binder.git] / src / rest-api.c
index c1110c5..06b6ea8 100644 (file)
@@ -203,6 +203,7 @@ STATIC AFB_error callPluginApi(AFB_plugin *plugin, AFB_request *request, void *c
                             } else {
                                 json_object_object_add(jcall, "uuid", json_object_new_string (request->client->uuid));                                
                                 json_object_object_add(jcall, "token", json_object_new_string (request->client->token));                                
+                                json_object_object_add(jcall, "timeout", json_object_new_int (request->config->cntxTimeout));                                
                             }
                             break;
 
@@ -217,6 +218,7 @@ STATIC AFB_error callPluginApi(AFB_plugin *plugin, AFB_request *request, void *c
                             } else {
                                 json_object_object_add(jcall, "uuid", json_object_new_string (request->client->uuid));                                
                                 json_object_object_add(jcall, "token", json_object_new_string (request->client->token));                                
+                                json_object_object_add(jcall, "timeout", json_object_new_int (request->config->cntxTimeout));                                
                             }
                             break;
 
@@ -612,8 +614,9 @@ void initPlugins(AFB_session *session) {
     afbJsonType = json_object_new_string (AFB_MSG_JTYPE);
     int i = 0;
 
-    plugins[i++] = afsvRegister(session),
+    plugins[i++] = tokenRegister(session),
     plugins[i++] = alsaRegister(session),
+    plugins[i++] = helloWorldRegister(session),
 #ifdef HAVE_RADIO_PLUGIN
     plugins[i++] = radioRegister(session),
 #endif