Get first XAuth backend if none configured

This commit is contained in:
Martin Willi 2011-12-08 17:19:10 +01:00
parent cbda13f6fe
commit 59ee898326
1 changed files with 2 additions and 1 deletions

View File

@ -112,7 +112,8 @@ METHOD(xauth_manager_t, create_instance, xauth_method_t*,
enumerator = this->methods->create_enumerator(this->methods);
while (enumerator->enumerate(enumerator, &entry))
{
if (streq(name, entry->name) && role == entry->role)
if (role == entry->role &&
(!name || streq(name, entry->name)))
{
method = entry->constructor(server, peer);
if (method)