Linux bluetooth development
 help / color / mirror / Atom feed
From: Dmitriy Paliy <dmitriy.paliy@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: Dmitriy Paliy <dmitriy.paliy@nokia.com>
Subject: [PATCH 1/2] g_string_free shell be used in IRMC
Date: Thu, 11 Nov 2010 22:46:19 +0200	[thread overview]
Message-ID: <1289508380-8873-1-git-send-email-dmitriy.paliy@nokia.com> (raw)

g_string_free instead of string_free shell be used in IRMC plugin.
string_free is a callback function specific to filesystem plugin
only and used by OBEX drivers to close an OBEX object.
---
 plugins/irmc.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/plugins/irmc.c b/plugins/irmc.c
index 28c5e50..f7ad33b 100644
--- a/plugins/irmc.c
+++ b/plugins/irmc.c
@@ -254,10 +254,8 @@ static void irmc_disconnect(struct obex_session *os, void *user_data)
 		g_free(irmc->params);
 	}
 
-	if (irmc->buffer) {
-		string_free(irmc->buffer);
-		irmc->buffer = NULL;
-	}
+	if (irmc->buffer)
+		g_string_free(irmc->buffer, TRUE);
 
 	g_free(irmc);
 }
@@ -355,7 +353,7 @@ static void *irmc_open_pb(const char *name, struct irmc_session *irmc,
 		irmc->buffer = mybuf;
 	else {
 		irmc->buffer = g_string_append(irmc->buffer, mybuf->str);
-		string_free(mybuf);
+		g_string_free(mybuf, TRUE);
 	}
 
 	return irmc;
@@ -433,7 +431,7 @@ static int irmc_close(void *object)
 	DBG("");
 
 	if (irmc->buffer) {
-		string_free(irmc->buffer);
+		g_string_free(irmc->buffer, TRUE);
 		irmc->buffer = NULL;
 	}
 
-- 
1.7.0.4


             reply	other threads:[~2010-11-11 20:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-11 20:46 Dmitriy Paliy [this message]
2010-11-11 20:46 ` [PATCH 2/2] string_free is specific to filesystem only Dmitriy Paliy
2010-11-11 21:23   ` Johan Hedberg
2010-11-11 21:23 ` [PATCH 1/2] g_string_free shell be used in IRMC Johan Hedberg

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=1289508380-8873-1-git-send-email-dmitriy.paliy@nokia.com \
    --to=dmitriy.paliy@gmail.com \
    --cc=dmitriy.paliy@nokia.com \
    --cc=linux-bluetooth@vger.kernel.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