]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
updown: Return an empty DNS server enumerator if no IKE_SA available
authorMartin Willi <martin@revosec.ch>
Thu, 6 Feb 2014 15:38:39 +0000 (16:38 +0100)
committerMartin Willi <martin@revosec.ch>
Thu, 6 Feb 2014 15:38:39 +0000 (16:38 +0100)
The one existing caller does not handle a NULL return and always expects
an enumerator; and returning FALSE does not make sense anyway.

src/libcharon/plugins/updown/updown_handler.c

index 3a644380a271c3c306cc13f3f8da278192b157a5..0894d2d0747f5e6ee3aa8378b4d95071843079c0 100644 (file)
@@ -188,7 +188,7 @@ METHOD(updown_handler_t, create_dns_enumerator, enumerator_t*,
        ike_sa = charon->bus->get_sa(charon->bus);
        if (!ike_sa)
        {
-               return FALSE;
+               return enumerator_create_empty();
        }
 
        this->lock->read_lock(this->lock);