]> git.ipfire.org Git - thirdparty/mtr.git/commitdiff
rename function 397/head
authorAaron Lipinski <kris.lipinski@gmail.com>
Wed, 7 Apr 2021 20:14:00 +0000 (08:14 +1200)
committerAaron Lipinski <aaron.lipinski@roboticsplus.co.nz>
Thu, 8 Apr 2021 20:36:25 +0000 (08:36 +1200)
ui/gtk.c
ui/mtr.c
ui/mtr.h

index 8ad0bbdbb4948cb04d38f83b6b2a7e8313034ca1..7c4a9fd4513a4e26c06a1dc9798b3e4038f80737 100644 (file)
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -248,7 +248,7 @@ static gint Host_activate(
 
     ctl->af = DEFAULT_AF;  // should this obey the cmd line option?
     ctl->Hostname = gtk_entry_get_text(GTK_ENTRY(entry));
-    if (get_hostent_from_name(ctl, &res, ctl->Hostname) == 0) {
+    if (get_addrinfo_from_name(ctl, &res, ctl->Hostname) == 0) {
         net_reopen(ctl, res);
         freeaddrinfo(res);
         net_send_batch(ctl);
index a044d1ecbf44984b739654a551d2440c5b1f5c8c..6fd0d70ec752d59e9f95f7f6d32271b12815889d 100644 (file)
--- a/ui/mtr.c
+++ b/ui/mtr.c
@@ -694,12 +694,11 @@ static void init_rand(
     would be to use gethostbyname().  We'll use getaddrinfo() instead
     to generate the hostent.
 */
-int get_hostent_from_name(
+int get_addrinfo_from_name(
     struct mtr_ctl *ctl,
     struct addrinfo **res,
     const char *name)
 {
-    printf("get_hostent_from_name: %x %s\n", ctl->af, name);
     int gai_error;
     struct addrinfo hints;
 
@@ -796,7 +795,7 @@ int main(
         }
 
         struct addrinfo *res = NULL;
-        if (get_hostent_from_name(&ctl, &res, ctl.Hostname) != 0) {
+        if (get_addrinfo_from_name(&ctl, &res, ctl.Hostname) != 0) {
             if (ctl.Interactive)
                 exit(EXIT_FAILURE);
             else {
index 46c7a18a5ef56c1d21a080bc3b867242661f52e6..9297be746dca3ae585f9543e384fe89f9da2e17b 100644 (file)
--- a/ui/mtr.h
+++ b/ui/mtr.h
@@ -149,7 +149,7 @@ struct mplslen {
 #define running_as_root() (getuid() == 0)
 #endif
 
-int get_hostent_from_name(
+int get_addrinfo_from_name(
     struct mtr_ctl *ctl,
     struct addrinfo **res,
     const char *name);