" <method name='Complete'>"
" <annotation name='org.freedesktop.DBus.GLib.Async' value=''/>"
" <arg type='o' name='transfer'/>"
- " </method>"
+" </method>"
" <method name='Release'>"
" <annotation name='org.freedesktop.DBus.GLib.Async' value=''/>"
" </method>"
static const gchar obex_service_reply_xml3[] =
"<node name='/'>"
-" <interface name='org.bluez.obex.reply'>"
+" <interface name='org.bluez.obex.reply'>"
" <method name='ReplyAuthorize'>"
-" <arg type='u' name='accept' direction='in'/>"
-" </method>"
-" </interface>"
+" <arg type='u' name='accept' direction='in'/>"
+" </method>"
+" </interface>"
"</node>";
static bt_obex_agent_info *__find_obex_agent_info(char *path)
if (info->name == NULL) {
info->name = sender;
} else {
- if (g_strcmp0(sender, info->name) != 0) {
+ if (g_strcmp0(sender, info->name) != 0)
goto fail;
- }
}
if (info->request_cb == NULL)
sender = (char *)g_dbus_method_invocation_get_sender(invocation);
- if (g_strcmp0(sender, info->name) != 0) {
+ if (g_strcmp0(sender, info->name) != 0)
goto fail;
- }
if (info->progress_cb == NULL)
goto fail;
sender = (char *)g_dbus_method_invocation_get_sender(invocation);
- if (g_strcmp0(sender, info->name) != 0) {
+ if (g_strcmp0(sender, info->name) != 0)
goto fail;
- }
if (info->error_cb == NULL)
goto fail;
sender = (char *)g_dbus_method_invocation_get_sender(invocation);
- if (g_strcmp0(sender, info->name) != 0) {
+ if (g_strcmp0(sender, info->name) != 0)
goto fail;
- }
if (info->complete_cb == NULL)
goto fail;
if (info->name) {
/*In H2 if user denies auth,release will come without request and hence
info->name will be NULL */
- if (g_strcmp0(sender, info->name) != 0) {
+ if (g_strcmp0(sender, info->name) != 0)
goto fail;
- }
}
if (info->release_cb == NULL)
{
bt_obex_agent_info *info;
GDBusProxy *proxy;
- GDBusNodeInfo *new_conn_node;
+ GDBusNodeInfo *new_conn_node = NULL;
GDBusNodeInfo *auth_reply_node = NULL;
GError *err = NULL;
BT_ERR("Error while registering object");
new_conn_node = g_dbus_node_info_new_for_xml(obex_service_agent_xml2, NULL);
+ if (new_conn_node == NULL)
+ return FALSE;
+
info->obex_agent_id = g_dbus_connection_register_object(conn, info->path,
new_conn_node->interfaces[0],
&method_table,
void _bt_obex_set_complete_cb(char *object_path,
bt_obex_complete_cb func, gpointer data)
{
- bt_obex_agent_info *info =__find_obex_agent_info(object_path);;
+ bt_obex_agent_info *info = __find_obex_agent_info(object_path);;
if (info == NULL)
return;