Browse Source

delay port registration notify until activate

tags/0.120.1
Torben Hohn 15 years ago
parent
commit
9675d2ca85
2 changed files with 10 additions and 2 deletions
  1. +8
    -1
      jackd/clientengine.c
  2. +2
    -1
      jackd/engine.c

+ 8
- 1
jackd/clientengine.c View File

@@ -815,7 +815,7 @@ int
jack_client_activate (jack_engine_t *engine, jack_client_id_t id) jack_client_activate (jack_engine_t *engine, jack_client_id_t id)
{ {
jack_client_internal_t *client; jack_client_internal_t *client;
JSList *node;
JSList *node, *node2;
int ret = -1; int ret = -1;


jack_lock_graph (engine); jack_lock_graph (engine);
@@ -840,11 +840,18 @@ jack_client_activate (jack_engine_t *engine, jack_client_id_t id)
++engine->external_client_cnt); ++engine->external_client_cnt);
jack_sort_graph (engine); jack_sort_graph (engine);


// send delayed notifications for ports.
for (node2 = client->ports; node2; node2 = jack_slist_next (node2)) {
jack_port_internal_t *port = (jack_port_internal_t *) node2->data;
jack_port_registration_notify (engine, port->shared->id, TRUE);
}

ret = 0; ret = 0;
break; break;
} }
} }



jack_unlock_graph (engine); jack_unlock_graph (engine);
return ret; return ret;
} }


+ 2
- 1
jackd/engine.c View File

@@ -4071,7 +4071,8 @@ next:
} }


client->ports = jack_slist_prepend (client->ports, port); client->ports = jack_slist_prepend (client->ports, port);
jack_port_registration_notify (engine, port_id, TRUE);
if( client->control->active )
jack_port_registration_notify (engine, port_id, TRUE);
jack_unlock_graph (engine); jack_unlock_graph (engine);


VERBOSE (engine, "registered port %s, offset = %u", VERBOSE (engine, "registered port %s, offset = %u",


Loading…
Cancel
Save