New service setting: ccldirective
[pazpar2-moved-to-github.git] / src / http_command.c
index 567189e..c92c7c3 100644 (file)
@@ -470,6 +470,8 @@ static void cmd_init(struct http_channel *c)
     wrbuf_puts(c->wrbuf, "</session>"
                "<protocol>" PAZPAR2_PROTOCOL_VERSION "</protocol>");
     
+    wrbuf_printf(c->wrbuf, "<keepAlive>%d</keepAlive>\n", 1000 * ((s->psession->service->session_timeout >= 20) ?
+                                                                  (s->psession->service->session_timeout - 10) : 50));
     response_close(c, "init");
 }
 
@@ -1171,7 +1173,8 @@ static void cmd_show(struct http_channel *c)
         release_session(c, s);
         return;
     }
-    session_sort(s->psession, sp->name, sp->increasing);
+    session_sort(s->psession, sp->name, sp->increasing,
+                 sp->type == Metadata_sortkey_position);
 
     status = session_active_clients(s->psession);