summaryrefslogtreecommitdiffstats
path: root/include/afb
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2019-01-02 20:01:44 +0100
committerJose Bollo <jose.bollo@iot.bzh>2019-01-04 14:19:06 +0100
commit3bb9874df7e9e8e325ec4bcb5e03616d98c5d504 (patch)
tree1cb003d08a34cedc7a7d7a0740967149f4bc8ac0 /include/afb
parenteb9be95e4cec2ec965cd38c6b3a7ed295982b1a1 (diff)
afb-binding-v3: Fix issues in includes
Fix 1: afb_api_v3_verbose doesn't exist Fix 2: afb_api_vverbose isn't declared Fix 3: Ensure implicit cast of "api" and "req" Using presupposed knowledge of internals of afb_api_t and afb_req_t is bad when dealing with implicit conversion in C++ and is generally not the way to go. Change-Id: I2630faa5ea0ae315ca95e4fd6ed6ae1a0beb01a5 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'include/afb')
-rw-r--r--include/afb/afb-binding-predefs.h1
-rw-r--r--include/afb/afb-binding-v3.h10
2 files changed, 6 insertions, 5 deletions
diff --git a/include/afb/afb-binding-predefs.h b/include/afb/afb-binding-predefs.h
index 47907a4a..eff424cc 100644
--- a/include/afb/afb-binding-predefs.h
+++ b/include/afb/afb-binding-predefs.h
@@ -303,6 +303,7 @@
#define afb_api_x3_set_userdata afb_api_set_userdata
#define afb_api_x3_wants_log_level afb_api_wants_log_level
+#define afb_api_x3_vverbose afb_api_vverbose
#define afb_api_x3_verbose afb_api_verbose
#define afb_api_x3_get_event_loop afb_api_get_event_loop
#define afb_api_x3_get_user_bus afb_api_get_user_bus
diff --git a/include/afb/afb-binding-v3.h b/include/afb/afb-binding-v3.h
index 84af4861..287925fc 100644
--- a/include/afb/afb-binding-v3.h
+++ b/include/afb/afb-binding-v3.h
@@ -192,8 +192,8 @@ extern const struct afb_binding_v3 afbBindingV3;
# define AFB_API_VERBOSE_V3(api,level,...) \
do { if(level <= AFB_VERBOSITY_LEVEL_ERROR) \
- afb_api_v3_verbose(api,level,__FILE__,__LINE__,NULL,__VA_ARGS__); \
- else afb_api_v3_verbose(api,level,__FILE__,__LINE__,NULL); } while(0)
+ afb_api_x3_verbose(api,level,__FILE__,__LINE__,NULL,__VA_ARGS__); \
+ else afb_api_x3_verbose(api,level,__FILE__,__LINE__,NULL); } while(0)
# define AFB_REQ_VERBOSE_V3(req,level,...) \
do { if(level <= AFB_VERBOSITY_LEVEL_ERROR) \
@@ -203,7 +203,7 @@ extern const struct afb_binding_v3 afbBindingV3;
#elif defined(AFB_BINDING_PRAGMA_NO_VERBOSE_DETAILS)
# define AFB_API_VERBOSE_V3(api,level,...) \
- afb_api_v3_verbose(api,level,NULL,0,NULL,__VA_ARGS__)
+ afb_api_x3_verbose(api,level,NULL,0,NULL,__VA_ARGS__)
# define AFB_REQ_VERBOSE_V3(req,level,...) \
afb_req_x2_verbose(req,level,NULL,0,NULL,__VA_ARGS__)
@@ -219,9 +219,9 @@ extern const struct afb_binding_v3 afbBindingV3;
#endif
#define _AFB_API_LOGGING_V3_(api,llevel,...) \
- do{ if(AFB_SYSLOG_MASK_WANT((api)->logmask,(llevel))) AFB_API_VERBOSE_V3((api),(llevel),__VA_ARGS__); }while(0)
+ do{ if(afb_api_wants_log_level((api),(llevel))) AFB_API_VERBOSE_V3((api),(llevel),__VA_ARGS__); }while(0)
#define _AFB_REQ_LOGGING_V3_(req,llevel,...) \
- do{ if(AFB_SYSLOG_MASK_WANT((req)->api->logmask,(llevel))) AFB_REQ_VERBOSE_V3((req),(llevel),__VA_ARGS__); }while(0)
+ do{ if(afb_req_wants_log_level((req),(llevel))) AFB_REQ_VERBOSE_V3((req),(llevel),__VA_ARGS__); }while(0)
#define AFB_API_ERROR_V3(api,...) _AFB_API_LOGGING_V3_(api,AFB_SYSLOG_LEVEL_ERROR,__VA_ARGS__)
#define AFB_API_WARNING_V3(api,...) _AFB_API_LOGGING_V3_(api,AFB_SYSLOG_LEVEL_WARNING,__VA_ARGS__)