Commit 31f2c5f8 authored by Pekka Pessi's avatar Pekka Pessi

Added ELI_BADHINTS to su_localinfo.

darcs-hash:20051213130012-65a35-e5e29d6f4067bd490b8b8f02798b79ce6b4bca0c.gz
parent cd80becd
......@@ -160,6 +160,8 @@ int su_getlocalinfo(su_localinfo_t const *hints,
*hh = *hints;
if (hh->li_canonname)
hh->li_flags |= LI_CANONNAME;
if ((hh->li_flags & LI_IFNAME) && hh->li_ifname == NULL)
return ELI_BADHINTS;
}
switch (hh->li_family) {
......@@ -247,6 +249,7 @@ char const *su_gli_strerror(int error)
case ELI_FAMILY: return "Unknown address family";
case ELI_RESOLVER: return "Error when resolving address";
case ELI_SYSTEM: return "System error";
case ELI_BADHINTS: return "Invalid value for hints";
default: return "Unknown error";
}
}
......
......@@ -78,12 +78,13 @@ enum {
/** Localinfo error codes */
enum {
ELI_NOERROR = 0, /**< No error. */
ELI_NOADDRESS = -1, /**< No matching address. */
ELI_MEMORY = -2, /**< Memory allocation error. */
ELI_FAMILY = -3, /**< Unknown address family. */
ELI_RESOLVER = -4, /**< Error when resolving address. */
ELI_SYSTEM = -5 /**< System error. */
ELI_SYSTEM = -5, /**< System error. */
ELI_BADHINTS = -6, /**< Invalid value for hints. */
ELI_NOERROR = 0 /**< No error. */
};
/** Request local address information */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment