From: Aaron Lipinski Date: Wed, 7 Apr 2021 20:14:00 +0000 (+1200) Subject: rename function X-Git-Tag: v0.95~6^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e01af2ac2e4bd6520ea41e453e770e092050c23;p=thirdparty%2Fmtr.git rename function --- diff --git a/ui/gtk.c b/ui/gtk.c index 8ad0bbd..7c4a9fd 100644 --- 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); diff --git a/ui/mtr.c b/ui/mtr.c index a044d1e..6fd0d70 100644 --- 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 { diff --git a/ui/mtr.h b/ui/mtr.h index 46c7a18..9297be7 100644 --- 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);