Check-in [75fb6dcec1]
Overview
Comment:Treat all failures from getaddrinfo() as an empty list, rather than an error
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 75fb6dcec1943a78efceea5e475cef7f23035b9f2fd33f38e2bf212e5785dfb4
User & Date: rkeene on 2019-01-22 17:46:21
Other Links: manifest | tags
Context
2019-01-22
17:47
Updated kit building check-in: 572ef3e921 user: rkeene tags: trunk
17:46
Treat all failures from getaddrinfo() as an empty list, rather than an error check-in: 75fb6dcec1 user: rkeene tags: trunk
17:40
Fall back to vendored version of Tcl packages for testing check-in: cf50a21341 user: rkeene tags: trunk
Changes

Modified nano.c from [f5fc2eab10] to [df4af05b56].

635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
	if (hostname_utf8_length_processed != hostname_utf8_length) {
		Tcl_SetResult(interp, "Failed to convert entire buffer", NULL);

		return(TCL_ERROR);
	}

	gai_ret = getaddrinfo(hostname, NULL, NULL, &gai_data);
	if (gai_ret == EAI_NODATA || gai_ret == EAI_NONAME) {
		Tcl_SetResult(interp, "", NULL);

		return(TCL_OK);
	}
	if (gai_ret != 0) {
		Tcl_SetResult(interp, (char *) gai_strerror(gai_ret), NULL);

		return(TCL_ERROR);
	}

	list_of_hostnames = Tcl_NewObj();
	for (addr_current = gai_data; addr_current; addr_current = addr_current->ai_next) {
		if (addr_current->ai_family != AF_INET && addr_current->ai_family != AF_INET6) {
			continue;
		}








|




<
<
<
<
<







635
636
637
638
639
640
641
642
643
644
645
646





647
648
649
650
651
652
653
	if (hostname_utf8_length_processed != hostname_utf8_length) {
		Tcl_SetResult(interp, "Failed to convert entire buffer", NULL);

		return(TCL_ERROR);
	}

	gai_ret = getaddrinfo(hostname, NULL, NULL, &gai_data);
	if (gai_ret != 0) {
		Tcl_SetResult(interp, "", NULL);

		return(TCL_OK);
	}






	list_of_hostnames = Tcl_NewObj();
	for (addr_current = gai_data; addr_current; addr_current = addr_current->ai_next) {
		if (addr_current->ai_family != AF_INET && addr_current->ai_family != AF_INET6) {
			continue;
		}