aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2021-08-25 16:00:22 -0400
committerScott Murray <scott.murray@konsulko.com>2021-08-25 16:03:30 -0400
commit42cb637eeb0a4199d585fb4dc013ce44b922b14c (patch)
tree9e60c9bc49f54da7d26fb09532a4c7e3400114b3
parentf8cb98997734001dac0534110a5c0d97f71bc7a8 (diff)
Update verb callback namesnext
Building with the newer gcc + glibc on the 3.4/honister branch of poky fails due to the "pause" verb callback colliding with the POSIX function of the same name. To avoid this issue, rename all the verb callbacks to <verb>_cb. Bug-AGL: SPEC-3819 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: I5975883b11682c8b2d0a2e96e4b561f203cf29c0
-rw-r--r--src/afm-binding.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/afm-binding.c b/src/afm-binding.c
index 1771520..184c0ab 100644
--- a/src/afm-binding.c
+++ b/src/afm-binding.c
@@ -339,7 +339,7 @@ static void reply_status(afb_req_t req, int status)
/*
* On query "runnables"
*/
-static void runnables(afb_req_t req)
+static void runnables_cb(afb_req_t req)
{
int all;
const char *lang;
@@ -359,7 +359,7 @@ static void runnables(afb_req_t req)
/*
* On query "detail"
*/
-static void detail(afb_req_t req)
+static void detail_cb(afb_req_t req)
{
const char *lang;
const char *appid;
@@ -383,7 +383,7 @@ static void detail(afb_req_t req)
/*
* On query "start"
*/
-static void start(afb_req_t req)
+static void start_cb(afb_req_t req)
{
const char *appid;
struct json_object *appli, *resp;
@@ -421,7 +421,7 @@ static void start(afb_req_t req)
/*
* On query "once"
*/
-static void once(afb_req_t req)
+static void once_cb(afb_req_t req)
{
const char *appid;
struct json_object *appli, *resp;
@@ -453,7 +453,7 @@ static void once(afb_req_t req)
/*
* On query "pause"
*/
-static void pause(afb_req_t req)
+static void pause_cb(afb_req_t req)
{
int runid, status;
if (onrunid(req, "pause", &runid)) {
@@ -465,7 +465,7 @@ static void pause(afb_req_t req)
/*
* On query "resume" from 'smsg' with parameters of 'obj'.
*/
-static void resume(afb_req_t req)
+static void resume_cb(afb_req_t req)
{
int runid, status;
if (onrunid(req, "resume", &runid)) {
@@ -477,7 +477,7 @@ static void resume(afb_req_t req)
/*
* On query "terminate"
*/
-static void terminate(afb_req_t req)
+static void terminate_cb(afb_req_t req)
{
int runid, status;
if (onrunid(req, "terminate", &runid)) {
@@ -489,7 +489,7 @@ static void terminate(afb_req_t req)
/*
* On query "runners"
*/
-static void runners(afb_req_t req)
+static void runners_cb(afb_req_t req)
{
int all;
struct json_object *resp;
@@ -501,7 +501,7 @@ static void runners(afb_req_t req)
/*
* On query "state"
*/
-static void state(afb_req_t req)
+static void state_cb(afb_req_t req)
{
int runid;
struct json_object *resp;
@@ -514,7 +514,7 @@ static void state(afb_req_t req)
/*
* On querying installation of widget(s)
*/
-static void install(afb_req_t req)
+static void install_cb(afb_req_t req)
{
const char *wgtfile;
const char *root;
@@ -563,7 +563,7 @@ static void install(afb_req_t req)
/*
* On querying uninstallation of widget(s)
*/
-static void uninstall(afb_req_t req)
+static void uninstall_cb(afb_req_t req)
{
const char *idaver;
const char *root;
@@ -599,7 +599,7 @@ static void onsighup(int signal)
application_list_changed(_update_, _update_);
}
-static int init(afb_api_t api)
+static int init_cb(afb_api_t api)
{
/* create TRUE */
json_true = json_object_new_boolean(1);
@@ -620,17 +620,17 @@ static int init(afb_api_t api)
static const afb_verb_t verbs[] =
{
- {.verb=_runnables_, .callback=runnables, .auth=&auth_detail, .info="Get list of runnable applications", .session=AFB_SESSION_CHECK },
- {.verb=_detail_ , .callback=detail, .auth=&auth_detail, .info="Get the details for one application", .session=AFB_SESSION_CHECK },
- {.verb=_start_ , .callback=start, .auth=&auth_start, .info="Start an application", .session=AFB_SESSION_CHECK },
- {.verb=_once_ , .callback=once, .auth=&auth_start, .info="Start once an application", .session=AFB_SESSION_CHECK },
- {.verb=_terminate_, .callback=terminate, .auth=&auth_kill, .info="Terminate a running application", .session=AFB_SESSION_CHECK },
- {.verb=_pause_ , .callback=pause, .auth=&auth_kill, .info="Pause a running application", .session=AFB_SESSION_CHECK },
- {.verb=_resume_ , .callback=resume, .auth=&auth_kill, .info="Resume a paused application", .session=AFB_SESSION_CHECK },
- {.verb=_runners_ , .callback=runners, .auth=&auth_state, .info="Get the list of running applications", .session=AFB_SESSION_CHECK },
- {.verb=_state_ , .callback=state, .auth=&auth_state, .info="Get the state of a running application", .session=AFB_SESSION_CHECK },
- {.verb=_install_ , .callback=install, .auth=&auth_install, .info="Install an application using a widget file", .session=AFB_SESSION_CHECK },
- {.verb=_uninstall_, .callback=uninstall, .auth=&auth_uninstall, .info="Uninstall an application", .session=AFB_SESSION_CHECK },
+ {.verb=_runnables_, .callback=runnables_cb, .auth=&auth_detail, .info="Get list of runnable applications", .session=AFB_SESSION_CHECK },
+ {.verb=_detail_ , .callback=detail_cb, .auth=&auth_detail, .info="Get the details for one application", .session=AFB_SESSION_CHECK },
+ {.verb=_start_ , .callback=start_cb, .auth=&auth_start, .info="Start an application", .session=AFB_SESSION_CHECK },
+ {.verb=_once_ , .callback=once_cb, .auth=&auth_start, .info="Start once an application", .session=AFB_SESSION_CHECK },
+ {.verb=_terminate_, .callback=terminate_cb, .auth=&auth_kill, .info="Terminate a running application", .session=AFB_SESSION_CHECK },
+ {.verb=_pause_ , .callback=pause_cb, .auth=&auth_kill, .info="Pause a running application", .session=AFB_SESSION_CHECK },
+ {.verb=_resume_ , .callback=resume_cb, .auth=&auth_kill, .info="Resume a paused application", .session=AFB_SESSION_CHECK },
+ {.verb=_runners_ , .callback=runners_cb, .auth=&auth_state, .info="Get the list of running applications", .session=AFB_SESSION_CHECK },
+ {.verb=_state_ , .callback=state_cb, .auth=&auth_state, .info="Get the state of a running application", .session=AFB_SESSION_CHECK },
+ {.verb=_install_ , .callback=install_cb, .auth=&auth_install, .info="Install an application using a widget file", .session=AFB_SESSION_CHECK },
+ {.verb=_uninstall_, .callback=uninstall_cb, .auth=&auth_uninstall, .info="Uninstall an application", .session=AFB_SESSION_CHECK },
{.verb=NULL }
};
@@ -640,7 +640,7 @@ const afb_binding_t afbBindingExport = {
.info = "Application Framework Master Service",
.verbs = verbs,
.preinit = NULL,
- .init = init,
+ .init = init_cb,
.onevent = NULL,
.noconcurrency = 1 /* relies on binder for serialization of requests */
};