s->session_id = sesid;
if (process_settings(s->psession, c->request, c->response) < 0)
return;
- sprintf(buf, HTTP_COMMAND_RESPONSE_PREFIX "<init><status>OK</status><session>%u</session>"
- "<protocol>" PAZPAR2_PROTOCOL_VERSION "</protocol></init>", sesid);
+
+ sprintf(buf, HTTP_COMMAND_RESPONSE_PREFIX
+ "<init><status>OK</status><session>%u", sesid);
+ if (c->server->server_id)
+ {
+ strcat(buf, ".");
+ strcat(buf, c->server->server_id);
+ }
+ strcat(buf, "</session>"
+ "<protocol>" PAZPAR2_PROTOCOL_VERSION "</protocol></init>");
rs->payload = nmem_strdup(c->nmem, buf);
http_send_response(c);
}
server->mergekey_pct = 0;
server->server_settings = 0;
+ xmlChar *server_id = xmlGetProp(node, (xmlChar *) "id");
+ if (server_id)
+ server->server_id = nmem_strdup(nmem, (const char *)server_id);
+ else
+ server->server_id = 0;
+
for (n = node->children; n; n = n->next)
{
if (n->type != XML_ELEMENT_NODE)