summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
c5292c6)
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>
#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_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
#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
# define AFB_API_VERBOSE_V3(api,level,...) \
do { if(level <= AFB_VERBOSITY_LEVEL_ERROR) \
# 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) \
# define AFB_REQ_VERBOSE_V3(req,level,...) \
do { if(level <= AFB_VERBOSITY_LEVEL_ERROR) \
#elif defined(AFB_BINDING_PRAGMA_NO_VERBOSE_DETAILS)
# define AFB_API_VERBOSE_V3(api,level,...) \
#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__)
# define AFB_REQ_VERBOSE_V3(req,level,...) \
afb_req_x2_verbose(req,level,NULL,0,NULL,__VA_ARGS__)
#endif
#define _AFB_API_LOGGING_V3_(api,llevel,...) \
#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,...) \
#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__)
#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__)