small fix to avoid warning when runing replay session

This commit is contained in:
Gautier Hattenberger
2011-11-02 15:15:13 +01:00
parent 1d6eee4d50
commit f0dcd7eceb
2 changed files with 6 additions and 2 deletions
+4 -1
View File
@@ -549,7 +549,10 @@ let create_ac = fun alert (geomap:G.widget) (acs_notebook:GPack.notebook) (ac_id
let settings_file = Http.file_of_url settings_url in
let settings_xml =
try
ExtXml.parse_file ~noprovedtd:true settings_file
if String.compare "replay" settings_file <> 0 then
ExtXml.parse_file ~noprovedtd:true settings_file
else
Xml.Element("empty", [], [])
with exc ->
prerr_endline (Printexc.to_string exc);
Xml.Element("empty", [], [])
+2 -1
View File
@@ -590,7 +590,8 @@ let send_config = fun http _asker args ->
let fp = prefix ("var" // ac_name // "flight_plan.xml")
and af = prefix ("conf" // ExtXml.attrib conf "airframe")
and rc = prefix ("conf" // ExtXml.attrib conf "radio")
and settings = prefix ("var" // ac_name // "settings.xml") in
and settings = if not _is_replayed then prefix ("var" // ac_name //
"settings.xml") else "file://replay" in
let col = try Xml.attrib conf "gui_color" with _ -> new_color () in
let ac_name = try Xml.attrib conf "name" with _ -> "" in
[ "ac_id", Pprz.String ac_id;