~diwic/ubuntu/lucid/pulseaudio/bugfixes

« back to all changes in this revision

Viewing changes to src/pulse/operation.c

  • Committer: Bazaar Package Importer
  • Author(s): Luke Yelavich
  • Date: 2008-11-04 15:46:00 UTC
  • mfrom: (1.2.1 upstream) (1.1.6 lenny)
  • Revision ID: james.westby@ubuntu.com-20081104154600-hlzknpcazaam0nxm
Tags: 0.9.13-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Don't build against, and create jack package. Jack is not in main.
  - Remove --disable-per-user-esound-socket from configure flags, as we still
    want per user esound sockets.
  - Remove stop links from rc0 and rc6.
  - Change default resample algorithm and bubffer size.
  - Add alsa configuration files to route alsa applications via pulseaudio.
  - Move libasound2-plugins from Recommends to Depends.
* debian/pulseaudio.preinst: When upgrading from intrepid, remove
  /etc/X11/Xsession.d/70pulseaudio, as this was used to minimize a race
  condition when starting GNOME in intrepid. This race should not exist in
  jaunty once libcanberra is built to use pulseaudio as a backend.
* Do not spawn a pulseaudio server if clients fail to find a running server.
* Remove explicit version dependency for libspeex-dev to allow the package
  to be built for now.
* Regenerate autotools files to work with Ubuntu's newer libtool/libltdl.
* debian/control: libpulsecore5 -> libpulsecore8 to match the library
  soname.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: operation.c 2067 2007-11-21 01:30:40Z lennart $ */
2
 
 
3
1
/***
4
2
  This file is part of PulseAudio.
5
3
 
77
75
    }
78
76
}
79
77
 
 
78
static void operation_unlink(pa_operation *o) {
 
79
    pa_assert(o);
 
80
 
 
81
    if (o->context) {
 
82
        pa_assert(PA_REFCNT_VALUE(o) >= 2);
 
83
 
 
84
        PA_LLIST_REMOVE(pa_operation, o->context->operations, o);
 
85
        pa_operation_unref(o);
 
86
 
 
87
        o->context = NULL;
 
88
    }
 
89
 
 
90
    o->stream = NULL;
 
91
    o->callback = NULL;
 
92
    o->userdata = NULL;
 
93
}
 
94
 
80
95
static void operation_set_state(pa_operation *o, pa_operation_state_t st) {
81
96
    pa_assert(o);
82
97
    pa_assert(PA_REFCNT_VALUE(o) >= 1);
88
103
 
89
104
    o->state = st;
90
105
 
91
 
    if ((o->state == PA_OPERATION_DONE) || (o->state == PA_OPERATION_CANCELED)) {
92
 
 
93
 
        if (o->context) {
94
 
            pa_assert(PA_REFCNT_VALUE(o) >= 2);
95
 
 
96
 
            PA_LLIST_REMOVE(pa_operation, o->context->operations, o);
97
 
            pa_operation_unref(o);
98
 
        }
99
 
 
100
 
        o->context = NULL;
101
 
        o->stream = NULL;
102
 
        o->callback = NULL;
103
 
        o->userdata = NULL;
104
 
    }
 
106
    if ((o->state == PA_OPERATION_DONE) || (o->state == PA_OPERATION_CANCELED))
 
107
        operation_unlink(o);
105
108
 
106
109
    pa_operation_unref(o);
107
110
}