Browse Source

Yet another sort bugfix. One rare locking bug fixed in client removal code.

git-svn-id: svn+ssh://jackaudio.org/trunk/jack@137 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/0.109.0
kaiv 24 years ago
parent
commit
ba6b596369
2 changed files with 19 additions and 7 deletions
  1. +1
    -1
      configure.in
  2. +18
    -6
      engine.c

+ 1
- 1
configure.in View File

@@ -5,7 +5,7 @@ AC_CONFIG_AUX_DIR(.)

JACK_MAJOR_VERSION=0
JACK_MINOR_VERSION=15
JACK_MICRO_VERSION=5
JACK_MICRO_VERSION=6

BETA=



+ 18
- 6
engine.c View File

@@ -895,7 +895,9 @@ handle_client_io (jack_engine_t *engine, int fd)
if (read (client->request_fd, &req, sizeof (req)) < sizeof (req)) {
jack_error ("cannot read request from client");
/* XXX interlock problems with the driver thread here */
pthread_mutex_lock (&engine->graph_lock);
jack_remove_client (engine, client);
pthread_mutex_unlock (&engine->graph_lock);
return -1;
}

@@ -1424,6 +1426,9 @@ jack_remove_client (jack_engine_t *engine, jack_client_internal_t *client)
engine->control->time.frame = 0;
}

/* FIXME: called again in jack_client_delete(),
still needed here? (kaiv)
*/
jack_client_disconnect (engine, client);

/* try to force the server thread to return from poll */
@@ -1561,8 +1566,11 @@ jack_deliver_event (jack_engine_t *engine, jack_client_internal_t *client, jack_
}

if (client_err || status != 0) {
/* FIXME: caller is not expecting the client to be
removed while delivering an event! (kaiv)
*/
jack_error("error while delivering an event");
/* jack_remove_client (engine, client); */
client->control->active = FALSE;
}
}

@@ -1743,19 +1751,23 @@ jack_trace_terminal (jack_client_internal_t *c1, jack_client_internal_t *rbase)
once.
*/

if (g_slist_find (rbase->fed_by, c2) == NULL) {
rbase->fed_by = g_slist_prepend (rbase->fed_by, c2);
if (c2 != rbase && c2 != c1) {

if (c2 != rbase && c2 != c1) {
if (g_slist_find (rbase->fed_by, c2) == NULL) {
rbase->fed_by = g_slist_prepend (rbase->fed_by, c2);
}

/* FIXME: if c2->fed_by is not up-to-date, we may end up
recursing infinitely (kaiv)
*/

if (g_slist_find (c2->fed_by, c1) == NULL) {
/* now recurse, so that we can mark base as being fed by
all routes that feed c2
*/

jack_trace_terminal (c2, rbase);
}
}

}
}



Loading…
Cancel
Save