qmimodem: add define CALLBACK_WITH_CME_ERROR(cb, err, args..)

This commit is contained in:
Alexander Couzens 2017-12-05 19:20:15 +01:00 committed by Denis Kenzior
parent 19218065a2
commit 85a0c9b595
1 changed files with 9 additions and 0 deletions

View File

@ -39,6 +39,15 @@ static inline struct cb_data *cb_data_new(void *cb, void *data)
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...) \
do { \
struct ofono_error cb_e; \