Browse Source

[0.99.12] client limit fix

git-svn-id: svn+ssh://jackaudio.org/trunk/jack@803 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/0.109.0
joq 21 years ago
parent
commit
c94066f80a
3 changed files with 12 additions and 10 deletions
  1. +1
    -1
      configure.ac
  2. +5
    -0
      example-clients/simple_client.c
  3. +6
    -9
      jackd/engine.c

+ 1
- 1
configure.ac View File

@@ -15,7 +15,7 @@ dnl changes are made
dnl ---
JACK_MAJOR_VERSION=0
JACK_MINOR_VERSION=99
JACK_MICRO_VERSION=11
JACK_MICRO_VERSION=12

dnl ---
dnl HOWTO: updating the jack protocol version


+ 5
- 0
example-clients/simple_client.c View File

@@ -136,6 +136,11 @@ main (int argc, char *argv[])
JACK_DEFAULT_AUDIO_TYPE,
JackPortIsOutput, 0);

if ((input_port == NULL) || (output_port == NULL)) {
fprintf(stderr, "no more JACK ports available\n");
exit (1);
}

/* Tell the JACK server that we are ready to roll. Our
* process() callback will start running now. */



+ 6
- 9
jackd/engine.c View File

@@ -1895,19 +1895,12 @@ jack_server_thread (void *arg)
engine->pfd[1].fd = engine->fds[1];
engine->pfd[1].events = POLLIN|POLLERR;
engine->pfd_max = 2;
pfd = engine->pfd;
max = engine->pfd_max;

while (!done) {
DEBUG ("start while");
/* XXX race here with new external clients
causing engine->pfd to be reallocated.
I don't know how to solve this
short of copying the entire
contents of the pfd struct. Ick.
*/
max = engine->pfd_max;
pfd = engine->pfd;
if (poll (pfd, max, 10000) < 0) {
if (errno == EINTR) {
@@ -1979,6 +1972,10 @@ jack_server_thread (void *arg)
close (client_socket);
}
}
/* handle_new_client() may have realloced engine->pfd */
pfd = engine->pfd;
max = engine->pfd_max;

/* check the ACK server socket */



Loading…
Cancel
Save