FIXME: Remove all use of add_child() from xmlpp.
[dcpomatic.git] / src / lib / encode_server.cc
index 036ea58a5df92b94cb5cde24e6a7666be195f3a4..fd5866ecf29c142a3a62b1c20f3ad4e823225643 100644 (file)
@@ -298,8 +298,8 @@ EncodeServer::broadcast_received ()
                /* Reply to the client saying what we can do */
                xmlpp::Document doc;
                auto root = doc.create_root_node ("ServerAvailable");
-               root->add_child("Threads")->add_child_text (raw_convert<string> (_worker_threads.size ()));
-               root->add_child("Version")->add_child_text (raw_convert<string> (SERVER_LINK_VERSION));
+               cxml::add_text_child(root, "Threads", raw_convert<string>(_worker_threads.size()));
+               cxml::add_text_child(root, "Version", raw_convert<string>(SERVER_LINK_VERSION));
                auto xml = doc.write_to_string ("UTF-8");
 
                if (_verbose) {