mirror of git://git.sysmocom.de/ofono
qmimodem: add define CALLBACK_WITH_CME_ERROR(cb, err, args..)
This commit is contained in:
parent
19218065a2
commit
85a0c9b595
|
@ -39,6 +39,15 @@ static inline struct cb_data *cb_data_new(void *cb, void *data)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define CALLBACK_WITH_CME_ERROR(cb, err, args...) \
|
||||||
|
do { \
|
||||||
|
struct ofono_error cb_e; \
|
||||||
|
cb_e.type = OFONO_ERROR_TYPE_CME; \
|
||||||
|
cb_e.error = err; \
|
||||||
|
\
|
||||||
|
cb(&cb_e, ##args); \
|
||||||
|
} while (0) \
|
||||||
|
|
||||||
#define CALLBACK_WITH_FAILURE(cb, args...) \
|
#define CALLBACK_WITH_FAILURE(cb, args...) \
|
||||||
do { \
|
do { \
|
||||||
struct ofono_error cb_e; \
|
struct ofono_error cb_e; \
|
||||||
|
|
Loading…
Reference in New Issue