From: Felix Fietkau Date: Sun, 17 Feb 2013 17:52:19 +0000 (+0100) Subject: suppress error callbacks if requested X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=cf9256f962c747a95720ceb88e076118743309b8;p=oweals%2Fuqmi.git suppress error callbacks if requested --- diff --git a/dev.c b/dev.c index 486230a..ed9d60f 100644 --- a/dev.c +++ b/dev.c @@ -58,7 +58,7 @@ static void __qmi_request_complete(struct qmi_dev *qmi, struct qmi_request *req, if (req->ret) msg = NULL; - if (req->cb) + if (req->cb && (msg || !req->no_error_cb)) req->cb(qmi, req, msg); if (req->complete) { diff --git a/uqmi.h b/uqmi.h index a404da5..2f06890 100644 --- a/uqmi.h +++ b/uqmi.h @@ -70,6 +70,7 @@ struct qmi_request { bool *complete; bool pending; + bool no_error_cb; uint8_t service; uint16_t tid; int ret;