[PATCH 1/2] g_string_free shell be used in IRMC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux