diff options
author | nicm <nicm> | 2015-04-27 22:58:58 +0000 |
---|---|---|
committer | nicm <nicm> | 2015-04-27 22:58:58 +0000 |
commit | c2bc84aa4dd30c46930994321de0541edf6a30e9 (patch) | |
tree | 785acfe23640d23ca4450b6fde0450afba73f916 | |
parent | b7777e7ef37a6a5b9a231602c1ac66a307ae23db (diff) | |
download | rtmux-c2bc84aa4dd30c46930994321de0541edf6a30e9.tar.gz rtmux-c2bc84aa4dd30c46930994321de0541edf6a30e9.tar.bz2 rtmux-c2bc84aa4dd30c46930994321de0541edf6a30e9.zip |
Do not include unattached clients when trying to find one for target.
-rw-r--r-- | cmd-find.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -125,11 +125,15 @@ cmd_find_best_client(struct client **clist, u_int csize) c = NULL; if (clist != NULL) { for (i = 0; i < csize; i++) { + if (clist[i]->session == NULL) + continue; if (cmd_find_client_better(clist[i], c)) c = clist[i]; } } else { TAILQ_FOREACH(c_loop, &clients, entry) { + if (c_loop->session == NULL) + continue; if (cmd_find_client_better(c_loop, c)) c = c_loop; } |