~ubuntu-branches/ubuntu/oneiric/bluez/oneiric

« back to all changes in this revision

Viewing changes to audio/media.c

  • Committer: Bazaar Package Importer
  • Author(s): Mathieu Trudel-Lapierre
  • Date: 2011-07-28 16:47:35 UTC
  • mfrom: (1.1.34 upstream) (6.3.15 sid)
  • Revision ID: james.westby@ubuntu.com-20110728164735-f34luwrarv52mhlq
Tags: 4.95-0ubuntu1
* New upstream release.
* Resynchronize with Debian unstable, remaining changes:
  - debian/source_bluez.py, debian/bluez.install:
    + apport hook made by Baptiste Mille-Mathias.
  - debian/rules: don't use simple-patchsys.
  - debian/source/format: use source format 3.0.
  - debian/patches/pkg-config-install-paths.patch: install bluez-alsa plugin
    to the multiarch path, now that alsa-lib has transitioned.
* debian/patches/02_disable_hal.patch: refreshed.
* debian/patches/pkg-config-install-paths.patch: refreshed.
* debian/control, debian/rules: run autoreconf when building as required by
  pkg-config-install-paths.patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
#include "../src/adapter.h"
35
35
#include "../src/dbus-common.h"
36
36
 
 
37
#include "glib-helper.h"
37
38
#include "log.h"
38
39
#include "error.h"
39
40
#include "device.h"
365
366
                return btd_error_invalid_args(msg);
366
367
 
367
368
        if (media_endpoint_create(adapter, sender, path, uuid, delay_reporting,
368
 
                                codec, capabilities, size, &err) == FALSE) {
 
369
                                codec, capabilities, size, &err) == NULL) {
369
370
                if (err == -EPROTONOSUPPORT)
370
371
                        return btd_error_not_supported(msg);
371
372
                else
408
409
{
409
410
        struct media_adapter *adapter = data;
410
411
 
411
 
        g_slist_foreach(adapter->endpoints, (GFunc) media_endpoint_release,
412
 
                                                                        NULL);
413
 
        g_slist_free(adapter->endpoints);
 
412
        g_slist_free_full(adapter->endpoints,
 
413
                                (GDestroyNotify) media_endpoint_release);
414
414
 
415
415
        dbus_connection_unref(adapter->conn);
416
416
 
643
643
        DBusConnection *conn;
644
644
        DBusMessage *msg;
645
645
        const char *path;
 
646
        struct media_transport *transport = endpoint->transport;
646
647
 
647
648
        if (endpoint->transport == NULL)
648
649
                return;
665
666
                                                        DBUS_TYPE_INVALID);
666
667
        g_dbus_send_message(conn, msg);
667
668
done:
668
 
        media_transport_destroy(endpoint->transport);
669
669
        endpoint->transport = NULL;
 
670
        media_transport_destroy(transport);
670
671
}
671
672
 
672
673
void media_endpoint_release(struct media_endpoint *endpoint)