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
Add 'noconcurrency' when creating dynamic API
[src/app-framework-binder.git]
/
src
/
afb-export.c
diff --git
a/src/afb-export.c
b/src/afb-export.c
index
f8e4be7
..
ea783b8
100644
(file)
--- a/
src/afb-export.c
+++ b/
src/afb-export.c
@@
-173,7
+173,7
@@
static struct afb_eventid *eventid_make_cb(void *closure, const char *name)
memcpy(event + plen + 1, name, nlen + 1);
/* create the event */
memcpy(event + plen + 1, name, nlen + 1);
/* create the event */
- return afb_evt_
create_event
(event);
+ return afb_evt_
eventid_create
(event);
}
static struct afb_event event_make_cb(void *closure, const char *name)
}
static struct afb_event event_make_cb(void *closure, const char *name)
@@
-255,11
+255,12
@@
static int api_new_api_cb(
void *closure,
const char *api,
const char *info,
void *closure,
const char *api,
const char *info,
+ int noconcurrency,
int (*preinit)(void*, struct afb_dynapi *),
void *preinit_closure)
{
struct afb_export *export = closure;
int (*preinit)(void*, struct afb_dynapi *),
void *preinit_closure)
{
struct afb_export *export = closure;
- return afb_api_dyn_add(export->apiset, api, info, preinit, preinit_closure);
+ return afb_api_dyn_add(export->apiset, api, info,
noconcurrency,
preinit, preinit_closure);
}
/**********************************************
}
/**********************************************
@@
-376,11
+377,12
@@
static int hooked_api_new_api_cb(
void *closure,
const char *api,
const char *info,
void *closure,
const char *api,
const char *info,
+ int noconcurrency,
int (*preinit)(void*, struct afb_dynapi *),
void *preinit_closure)
{
/* TODO */
int (*preinit)(void*, struct afb_dynapi *),
void *preinit_closure)
{
/* TODO */
- return api_new_api_cb(closure, api, info, preinit, preinit_closure);
+ return api_new_api_cb(closure, api, info,
noconcurrency,
preinit, preinit_closure);
}
/**********************************************
* vectors
}
/**********************************************
* vectors
@@
-568,10
+570,10
@@
static struct call_req *callreq_create(
callreq->xreq.context.validated = 1;
copy = (char*)&callreq[1];
memcpy(copy, api, lenapi);
callreq->xreq.context.validated = 1;
copy = (char*)&callreq[1];
memcpy(copy, api, lenapi);
- callreq->xreq.api = copy;
+ callreq->xreq.
request.
api = copy;
copy = ©[lenapi];
memcpy(copy, verb, lenverb);
copy = ©[lenapi];
memcpy(copy, verb, lenverb);
- callreq->xreq.verb = copy;
+ callreq->xreq.
request.
verb = copy;
callreq->xreq.listener = export->listener;
callreq->xreq.json = args;
callreq->export = export;
callreq->xreq.listener = export->listener;
callreq->xreq.json = args;
callreq->export = export;
@@
-1080,6
+1082,7
@@
static struct afb_export *create(struct afb_apiset *apiset, const char *apiname,
else {
memset(export, 0, sizeof *export);
export->apiname = strdup(apiname);
else {
memset(export, 0, sizeof *export);
export->apiname = strdup(apiname);
+ export->dynapi.apiname = export->apiname;
export->version = version;
export->state = Api_State_Pre_Init;
export->session = afb_session_addref(common_session);
export->version = version;
export->state = Api_State_Pre_Init;
export->session = afb_session_addref(common_session);
@@
-1144,6
+1147,7
@@
void afb_export_rename(struct afb_export *export, const char *apiname)
{
free(export->apiname);
export->apiname = strdup(apiname);
{
free(export->apiname);
export->apiname = strdup(apiname);
+ export->dynapi.apiname = export->apiname;
afb_export_update_hook(export);
}
afb_export_update_hook(export);
}