Open Source Telephony
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: ofono@ofono.org
Subject: Re: [PATCH v2 2/6] service: fixed possible meta with NULL uuid
Date: Fri, 23 Mar 2012 11:38:08 -0700	[thread overview]
Message-ID: <1332527888.1870.44.camel@aeonflux> (raw)
In-Reply-To: <1332521141-31865-3-git-send-email-sebastien.bianti@linux.intel.com>

[-- Attachment #1: Type: text/plain, Size: 786 bytes --]

Hi Sebastien,

> If mms_store_file fails.
> ---
>  src/service.c |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
> 
> diff --git a/src/service.c b/src/service.c
> index 3fdf4e0..0161ec0 100644
> --- a/src/service.c
> +++ b/src/service.c
> @@ -767,6 +767,15 @@ static DBusMessage *send_message(DBusConnection *conn,
>  
>  	msg->uuid = g_strdup(mms_store_file(service->identity,
>  						request->data_path));
> +	if (msg->uuid == NULL) {
> +		release_attachement_data(msg->attachments);
> +		mms_message_free(msg);
> +
> +		unlink(request->data_path);
> +		mms_request_destroy(request);
> +
> +		return __mms_error_trans_failure(dbus_msg);
> +	}

I am seeing a lot of code duplication here. We need to unify this.

Regards

Marcel



  reply	other threads:[~2012-03-23 18:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-23 16:45 [PATCH v2 0/6] mmsd: bug fixing in send message recovery =?unknown-8bit?q?S=C3=A9bastien?= Bianti
2012-03-23 16:45 ` [PATCH v2 1/6] service: remove dead file =?unknown-8bit?q?S=C3=A9bastien?= Bianti
2012-03-23 18:37   ` Marcel Holtmann
2012-03-23 16:45 ` [PATCH v2 2/6] service: fixed possible meta with NULL uuid =?unknown-8bit?q?S=C3=A9bastien?= Bianti
2012-03-23 18:38   ` Marcel Holtmann [this message]
2012-03-23 16:45 ` [PATCH v2 3/6] service: remove pdu without meta =?unknown-8bit?q?S=C3=A9bastien?= Bianti
2012-03-23 18:39   ` Marcel Holtmann
2012-03-23 16:45 ` [PATCH v2 4/6] service: request_post_file opens the pdu itself =?unknown-8bit?q?S=C3=A9bastien?= Bianti
2012-03-23 18:40   ` Marcel Holtmann
2012-03-23 16:45 ` [PATCH v2 5/6] service: fix some leaks =?unknown-8bit?q?S=C3=A9bastien?= Bianti
2012-03-23 18:40   ` Marcel Holtmann
2012-03-23 16:45 ` [PATCH v2 6/6] service: request needs to keep msg =?unknown-8bit?q?S=C3=A9bastien?= Bianti
2012-03-23 18:41   ` Marcel Holtmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1332527888.1870.44.camel@aeonflux \
    --to=marcel@holtmann.org \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox