void client_set_state(struct client *cl, enum client_state st)
{
cl->state = st;
- if (cl->session)
+ /* no need to check for all client being non-active if this one
+ already is. Note that session_active_clients also LOCKS session */
+ if (!client_is_active(cl) && cl->session)
{
int no_active = session_active_clients(cl->session);
if (no_active == 0)
{
strcpy(type, "xml");
}
+ else if (!strncmp(s, "txml", 4))
+ {
+ const char *cp = strchr(s, ';');
+ yaz_snprintf(type, 80, "txml; charset=%s", cp ? cp+1 : "marc-8s");
+ }
else
return -1;
return 0;
strcpy(type, "xml");
return 0;
}
+ else if (!strcmp(syntax, "TXML"))
+ {
+ strcpy(type, "txml");
+ return 0;
+ }
else if (!strcmp(syntax, "USmarc") || !strcmp(syntax, "MARC21"))
{
strcpy(type, "xml; charset=marc8-s");