summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/serverdialog.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gui/serverdialog.cpp b/src/gui/serverdialog.cpp
index 50510d15..3ea978e1 100644
--- a/src/gui/serverdialog.cpp
+++ b/src/gui/serverdialog.cpp
@@ -501,9 +501,18 @@ void ServerDialog::loadServers()
server.port = ServerInfo::defaultPortForServerType(server.type);
}
}
- else if (xmlStrEqual(subNode->name, BAD_CAST "description"))
+ else if (subNode->xmlChildrenNode && subNode->xmlChildrenNode->content)
{
- server.description = (const char*) subNode->xmlChildrenNode->content;
+ const char *text = (const char*) subNode->xmlChildrenNode->content;
+
+ if (xmlStrEqual(subNode->name, BAD_CAST "description"))
+ {
+ server.description = text;
+ }
+ else if (xmlStrEqual(subNode->name, BAD_CAST "persistentIp"))
+ {
+ server.persistentIp = strcmp(text, "1") == 0 || strcmp(text, "true") == 0;
+ }
}
}