-bugsbugsbugs
[oweals/gnunet.git] / src / gns / nss / nss_gns.c
index 3bb45a1533715a65faf2b998e00fde85a19aa47f..e48e4206c40d0e4f1e780ae85c8c87ebc6972ac9 100644 (file)
@@ -61,13 +61,13 @@ static int ends_with(const char *name, const char* suffix) {
 
 
 /**
- * Check if name is inside .gnunet or .zkey TLD
+ * Check if name is inside .gads or .zkey TLD
  *
  * @param name name to check
  * @return 1 if true
  */
 static int verify_name_allowed(const char *name) {
-    return ends_with(name, ".gnunet") || ends_with(name, ".zkey"); 
+    return ends_with(name, ".gads") || ends_with(name, ".zkey"); 
 }
 
 /**
@@ -140,13 +140,19 @@ enum nss_status _nss_gns_gethostbyname2_r(
         if (!gns_resolve_name(af, name, &u) == 0)
         {
           status = NSS_STATUS_NOTFOUND;
+          goto finish;
         }
     }
+    else
+    {
+      status = NSS_STATUS_UNAVAIL;
+      goto finish;
+    }
 
     if (u.count == 0) {
         *errnop = ETIMEDOUT;
         *h_errnop = HOST_NOT_FOUND;
-        printf("not found\n");
+        status = NSS_STATUS_NOTFOUND;
         goto finish;
     }