From bf608043778d20df625568a1796e064eacf2f37d Mon Sep 17 00:00:00 2001 From: Iscaro Date: Mon, 24 Sep 2012 11:31:06 -0300 Subject: [PATCH 1/1] OFono: Calling the callback in a wrong order --- utils/ofono.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/ofono.c b/utils/ofono.c index 961a847..5f6466d 100644 --- a/utils/ofono.c +++ b/utils/ofono.c @@ -1513,11 +1513,11 @@ static void _msg_add(OFono_Modem *m, const char *path, DBusMessageIter *prop) if (sms->pending_send) { OFono_Sent_SMS_Cb_Context *ctx = sms->pending_send; - if (ctx->cb) - ctx->cb((void *)ctx->data, OFONO_ERROR_NONE, sms); sms->destination = ctx->destination; sms->message = ctx->message; sms->timestamp = time(NULL); + if (ctx->cb) + ctx->cb((void *)ctx->data, OFONO_ERROR_NONE, sms); free(ctx); sms->pending_send = NULL; } -- 2.7.4