From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH obexd 11/13 v3] client: remove use of gobex in map module
Date: Wed, 8 Feb 2012 11:44:07 +0200 [thread overview]
Message-ID: <1328694249-22225-11-git-send-email-luiz.dentz@gmail.com> (raw)
In-Reply-To: <1328694249-22225-1-git-send-email-luiz.dentz@gmail.com>
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
gobex should not be use directly as it can interfere with ongoing
requests of the session.
---
client/map.c | 14 ++------------
1 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/client/map.c b/client/map.c
index 9a76919..68b1fbc 100644
--- a/client/map.c
+++ b/client/map.c
@@ -48,23 +48,16 @@ struct map_data {
static DBusConnection *conn = NULL;
-static void simple_cb(GObex *obex, GError *err, GObexPacket *rsp,
+static void simple_cb(struct obc_session *session, GError *err,
gpointer user_data)
{
DBusMessage *reply;
struct map_data *map = user_data;
- guint8 err_code = g_obex_packet_get_operation(rsp, NULL);
if (err != NULL)
reply = g_dbus_create_error(map->msg,
"org.openobex.Error.Failed",
"%s", err->message);
- else if (err_code != G_OBEX_RSP_SUCCESS)
- reply = g_dbus_create_error(map->msg,
- "org.openobex.Error.Failed",
- "%s (0x%02x)",
- g_obex_strerror(err_code),
- err_code);
else
reply = dbus_message_new_method_return(map->msg);
@@ -77,7 +70,6 @@ static DBusMessage *map_setpath(DBusConnection *connection,
{
struct map_data *map = user_data;
const char *folder;
- GObex *obex;
GError *err = NULL;
if (dbus_message_get_args(message, NULL, DBUS_TYPE_STRING, &folder,
@@ -86,9 +78,7 @@ static DBusMessage *map_setpath(DBusConnection *connection,
"org.openobex.Error.InvalidArguments",
NULL);
- obex = obc_session_get_obex(map->session);
-
- g_obex_setpath(obex, folder, simple_cb, map, &err);
+ obc_session_setpath(map->session, folder, simple_cb, map, &err);
if (err != NULL) {
DBusMessage *reply;
reply = g_dbus_create_error(message,
--
1.7.7.6
next prev parent reply other threads:[~2012-02-08 9:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-08 9:43 [PATCH obexd 01/13 v3] client: fix not checking session_request return Luiz Augusto von Dentz
2012-02-08 9:43 ` [PATCH obexd 02/13 v3] client: remove unused field from obc_session Luiz Augusto von Dentz
2012-02-08 9:43 ` [PATCH obexd 03/13 v3] client: fix not queuing requests properly Luiz Augusto von Dentz
2012-02-08 9:44 ` [PATCH obexd 04/13 v3] client: introduce obc_session_setpath Luiz Augusto von Dentz
2012-02-08 9:44 ` [PATCH obexd 05/13 v3] client: introduce obc_session_mkdir Luiz Augusto von Dentz
2012-02-08 9:44 ` [PATCH obexd 06/13 v3] client: introduce obc_session_copy Luiz Augusto von Dentz
2012-02-08 9:44 ` [PATCH obexd 07/13 v3] client: introduce obc_session_move Luiz Augusto von Dentz
2012-02-08 9:44 ` [PATCH obexd 08/13 v3] client: introduce obc_session_delete Luiz Augusto von Dentz
2012-02-08 9:44 ` [PATCH obexd 09/13 v3] client: introduce obc_session_cancel Luiz Augusto von Dentz
2012-02-08 9:44 ` [PATCH obexd 10/13 v3] client: remove use of gobex in pbap module Luiz Augusto von Dentz
2012-02-08 9:44 ` Luiz Augusto von Dentz [this message]
2012-02-08 9:44 ` [PATCH obexd 12/13 v3] client: remove use of gobex in ftp module Luiz Augusto von Dentz
2012-02-08 9:44 ` [PATCH obexd 13/13 v3] client: remove gobex dependency of session Luiz Augusto von Dentz
2012-02-08 10:42 ` [PATCH obexd 01/13 v3] client: fix not checking session_request return 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=1328694249-22225-11-git-send-email-luiz.dentz@gmail.com \
--to=luiz.dentz@gmail.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;
as well as URLs for NNTP newsgroup(s).