Get first XAuth backend if none configured
authorMartin Willi <martin@revosec.ch>
Thu, 8 Dec 2011 16:19:10 +0000 (17:19 +0100)
committerMartin Willi <martin@revosec.ch>
Tue, 20 Mar 2012 16:31:16 +0000 (17:31 +0100)
src/libcharon/sa/authenticators/xauth/xauth_manager.c

index 618a0bd..432c9c0 100644 (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)