From: Iscaro Date: Mon, 24 Sep 2012 14:31:06 +0000 (-0300) Subject: OFono: Calling the callback in a wrong order X-Git-Tag: accepted/2.0alpha/20121205.174825~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bf608043778d20df625568a1796e064eacf2f37d;p=profile%2Fivi%2Flemolo.git OFono: Calling the callback in a wrong order --- 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; }