dnsmasq: fix the dynamic dns object names patch
[openwrt/staging/mkresin.git] / package / network / services / dnsmasq / patches / 200-ubus_dns.patch
index 03fc5b50b35343069fde4d6254209afc51d6f563..b8c4e449525b1609b56ce71474dcfe8e937c072d 100644 (file)
 +              *dest = blobmsg_get_string(val);
 +}
 +
-+static bool ubus_dns_doctor(const char *name, int ttl, void *p, int af)
++static int ubus_dns_doctor(const char *name, int ttl, void *p, int af)
 +{
 +      struct blob_buf *b;
 +      char *addr;
 +
 +      if (!name)
-+              return false;
++              return 0;
 +
 +      b = ubus_dns_notify_prepare();
 +      if (!b)
-+              return false;
++              return 0;
 +
 +      blobmsg_add_string(b, "name", name);
 +
@@ -80,7 +80,7 @@
 +
 +      addr = blobmsg_alloc_string_buffer(b, "address", INET6_ADDRSTRLEN);
 +      if (!addr)
-+              return false;
++              return 0;
 +
 +      inet_ntop(af, p, addr, INET6_ADDRSTRLEN);
 +      blobmsg_add_string_buffer(b);
 +      ubus_dns_notify("dns_result", ubus_dns_doctor_cb, &addr);
 +
 +      if (!addr)
-+              return false;
++              return 0;
 +
 +      return inet_pton(af, addr, p) == 1;
 +}
 +#else
-+static bool ubus_dns_doctor(const char *name, int ttl, void *p, int af)
++static int ubus_dns_doctor(const char *name, int ttl, void *p, int af)
 +{
-+      return false;
++      return 0;
 +}
 +#endif
 +