projects
/
pazpar2-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
New block: Wait for preferred targets to be "ready"
[pazpar2-moved-to-github.git]
/
src
/
session.c
diff --git
a/src/session.c
b/src/session.c
index
f7c0b99
..
ea09249
100644
(file)
--- a/
src/session.c
+++ b/
src/session.c
@@
-436,7
+436,7
@@
void session_alert_watch(struct session *s, int what)
session_watchfun fun;
http_remove_observer(s->watchlist[what].obs);
session_watchfun fun;
http_remove_observer(s->watchlist[what].obs);
- fun = s->watchlist[what].fun;
+ fun = s->watchlist[what].fun;
data = s->watchlist[what].data;
/* reset watch before fun is invoked - in case fun wants to set
data = s->watchlist[what].data;
/* reset watch before fun is invoked - in case fun wants to set
@@
-509,6
+509,19
@@
int session_active_clients(struct session *s)
return res;
}
return res;
}
+int session_preferred_clients_ready(struct session *s)
+{
+ struct client_list *l;
+ int res = 0;
+
+ for (l = s->clients; l; l = l->next)
+ if (client_is_active_preferred(l->client))
+ res++;
+
+ return res == 0;
+}
+
+
enum pazpar2_error_code search(struct session *se,
const char *query,
enum pazpar2_error_code search(struct session *se,
const char *query,