diff options
author | José Bollo <jose.bollo@iot.bzh> | 2017-09-22 16:09:10 +0200 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2017-10-09 14:08:33 +0200 |
commit | 4a6490b96d8ac2da6a19b4f251c005ff1b1e7d61 (patch) | |
tree | 14a22162ff073b41fb6c6f006027cc68b6a07407 | |
parent | f30be1ca9ce04cfab55b9e6ce25cec6952f7e21d (diff) |
Provide the name of the API
Change-Id: I5b4e4b40385830d1b8921d079f5e7e732ec4247f
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
-rw-r--r-- | include/afb/afb-dynapi-itf.h | 3 | ||||
-rw-r--r-- | src/afb-export.c | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/include/afb/afb-dynapi-itf.h b/include/afb/afb-dynapi-itf.h index 38978a29..682558e0 100644 --- a/include/afb/afb-dynapi-itf.h +++ b/include/afb/afb-dynapi-itf.h @@ -43,6 +43,9 @@ struct afb_dynapi /* current verbosity level */ int verbosity; + + /* the name of the api */ + const char *apiname; }; /* diff --git a/src/afb-export.c b/src/afb-export.c index f8e4be71..ce48dbe0 100644 --- a/src/afb-export.c +++ b/src/afb-export.c @@ -1080,6 +1080,7 @@ static struct afb_export *create(struct afb_apiset *apiset, const char *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); @@ -1144,6 +1145,7 @@ void afb_export_rename(struct afb_export *export, const char *apiname) { free(export->apiname); export->apiname = strdup(apiname); + export->dynapi.apiname = export->apiname; afb_export_update_hook(export); } |