~ubuntu-branches/ubuntu/maverick/obexd/maverick

« back to all changes in this revision

Viewing changes to client/sync.c

  • Committer: Bazaar Package Importer
  • Author(s): Nobuhiro Iwamatsu
  • Date: 2010-04-27 04:17:15 UTC
  • mfrom: (0.1.3 sid) (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20100427041715-9dv1jqg73bs6xxr9
Tags: 0.23-1
* New upstream release (Closes: #558710).
* Update debian/control.
  - Remove Filippo Giunchedi <filippo@debian.org> from uploaders.
  - Add Nobuhiro Iwamatsu to Uploaders (Closes: #564570).
  - Bumped standards-version to 3.8.4.
  - Update description (Closes: #541880).
* Add debian/source/format.
  Set source format to "1.0". 

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
#include <glib.h>
30
30
#include <gdbus.h>
31
31
 
 
32
#include "transfer.h"
32
33
#include "session.h"
33
34
#include "sync.h"
34
35
 
73
74
static void sync_getphonebook_callback(struct session_data *session,
74
75
                                                void *user_data)
75
76
{
 
77
        struct transfer_data *transfer = session->pending->data;
76
78
        DBusMessage *reply;
77
79
        char *buf = NULL;
78
80
 
79
81
        reply = dbus_message_new_method_return(session->msg);
80
82
 
81
 
        if (session->filled > 0)
82
 
                buf = session->buffer;
 
83
        if (transfer->filled > 0)
 
84
                buf = transfer->buffer;
83
85
 
84
86
        dbus_message_append_args(reply,
85
87
                DBUS_TYPE_STRING, &buf,
86
88
                DBUS_TYPE_INVALID);
87
89
 
88
 
        session->filled = 0;
 
90
        transfer->filled = 0;
89
91
        g_dbus_send_message(session->conn, reply);
90
92
        dbus_message_unref(session->msg);
91
93
        session->msg = NULL;
111
113
                        ERROR_INF ".Failed", "Failed");
112
114
 
113
115
        session->msg = dbus_message_ref(message);
114
 
        session->filled = 0;
115
116
 
116
117
        return NULL;
117
118
}