Code Review
/
src
/
app-framework-binder.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fixed Client Session Context by Plugin
[src/app-framework-binder.git]
/
plugins
/
samples
/
SamplePost.c
diff --git
a/plugins/samples/SamplePost.c
b/plugins/samples/SamplePost.c
index
53d065a
..
13e1ad6
100644
(file)
--- a/
plugins/samples/SamplePost.c
+++ b/
plugins/samples/SamplePost.c
@@
-48,7
+48,8
@@
STATIC json_object* UploadAppli (AFB_request *request, AFB_PostItem *item) {
// This is called after PostForm and then after DonePostForm
if (item == NULL) {
AFB_PostCtx *postFileCtx = getPostContext(request);
// This is called after PostForm and then after DonePostForm
if (item == NULL) {
AFB_PostCtx *postFileCtx = getPostContext(request);
- if (postFileCtx != NULL) {
+ if (postFileCtx != NULL) {
+
// Do something intelligent here to install application
postFileCtx->errcode = MHD_HTTP_OK; // or error is something went wrong;
// Do something intelligent here to install application
postFileCtx->errcode = MHD_HTTP_OK; // or error is something went wrong;
@@
-107,7
+108,7
@@
STATIC AFB_restapi pluginApis[]= {
PUBLIC AFB_plugin *pluginRegister () {
AFB_plugin *plugin = malloc (sizeof (AFB_plugin));
plugin->type = AFB_PLUGIN_JSON;
PUBLIC AFB_plugin *pluginRegister () {
AFB_plugin *plugin = malloc (sizeof (AFB_plugin));
plugin->type = AFB_PLUGIN_JSON;
- plugin->info = "
Application Framework Binder Service
";
+ plugin->info = "
Sample with Post Upload Files
";
plugin->prefix= "post"; // url base
plugin->apis = pluginApis;
plugin->handle= (void*) "What ever you want";
plugin->prefix= "post"; // url base
plugin->apis = pluginApis;
plugin->handle= (void*) "What ever you want";