]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
resolv: Move res_isourserver, res_send from res_data.c to res_send.c
authorFlorian Weimer <fweimer@redhat.com>
Fri, 30 Jun 2017 09:31:47 +0000 (11:31 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Fri, 30 Jun 2017 09:31:48 +0000 (11:31 +0200)
ChangeLog
resolv/res_data.c
resolv/res_send.c

index dca3cb28991b6faf40664bd253bb1e60f1e57ca6..5b5b0d1239135fea001c8e60c04aba1edf5c0b4f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-06-30  Florian Weimer  <fweimer@redhat.com>
+
+       * resolv/res_data.c (res_isourserver, res_send): Move to ...
+       * resolv/res_send.c (res_isourserver, res_send): here.
+
 2017-06-30  Florian Weimer  <fweimer@redhat.com>
 
        * resolv/res_debug.c (_res_opcodes): Rename ...
index d05389e1347a57abda15acff63a22dd4ac9af80b..b790b4b725bc9eddb1fda71c40a55ed3d20f4826 100644 (file)
@@ -45,22 +45,6 @@ res_query(const char *name,  /* domain name */
        return (res_nquery(&_res, name, class, type, answer, anslen));
 }
 
-int
-res_isourserver(const struct sockaddr_in *inp) {
-       return (res_ourserver_p(&_res, (const struct sockaddr_in6 *) inp));
-}
-
-int
-res_send(const u_char *buf, int buflen, u_char *ans, int anssiz) {
-       if (__res_maybe_init (&_res, 1) == -1) {
-               /* errno should have been set by res_init() in this case. */
-               return (-1);
-       }
-
-       return (res_nsend(&_res, buf, buflen, ans, anssiz));
-}
-
-
 void
 res_close(void) {
        /*
index 01b9b0e16a10569b0dd2459530824dd18c5f58c7..a7daae8a06c423adb60d18aecb4718512e31b5aa 100644 (file)
@@ -243,6 +243,12 @@ res_ourserver_p(const res_state statp, const struct sockaddr_in6 *inp)
        return (0);
 }
 
+int
+res_isourserver (const struct sockaddr_in *inp)
+{
+  return res_ourserver_p (&_res, (const struct sockaddr_in6 *) inp);
+}
+
 /* int
  * res_nameinquery(name, type, class, buf, eom)
  *     look for (name,type,class) in the query section of packet (buf,eom)
@@ -544,6 +550,15 @@ res_nsend(res_state statp,
 }
 libresolv_hidden_def (res_nsend)
 
+int
+res_send (const unsigned char *buf, int buflen, unsigned char *ans, int anssiz)
+{
+  if (__res_maybe_init (&_res, 1) == -1)
+    /* errno should have been set by res_init in this case.  */
+    return -1;
+  return res_nsend (&_res, buf, buflen, ans, anssiz);
+}
+
 /* Private */
 
 static struct sockaddr *