Tcl Source Code

Check-in [3f470535de]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Bug [3599194]: compat/fake-rfc2553.c is broken
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3f470535de6fdc66f7693200495707f7ad96a027
User & Date: jan.nijtmans 2013-02-23 20:00:49
Context
2013-02-25
13:16
For Unicode 6.3, mongolian vowel separator (U+180e) is nominated to change character class from Spac... check-in: b553432c31 user: jan.nijtmans tags: trunk
2013-02-24
12:17
merge trunk check-in: 8738bbd988 user: mig tags: mig-no280
2013-02-23
20:16
merge trunk. Comment improvements, styling. check-in: 3f9ac86c63 user: jan.nijtmans tags: initsubsystems
20:00
Bug [3599194]: compat/fake-rfc2553.c is broken check-in: 3f470535de user: jan.nijtmans tags: trunk
2013-02-22
19:10
unused variables check-in: 0ca3bfd67d user: dgp tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.






1
2
3
4
5
6
7





2013-02-22  Don Porter  <[email protected]>

	* generic/tclAssembly.c:	Shift more burden of smart cleanup
	* generic/tclCompile.c:		onto the TclFreeCompileEnv() routine.
	Stop crashes when the hookProc raises an error.

2013-02-20  Don Porter  <[email protected]>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
2013-02-23  Jan Nijtmans  <[email protected]>

	* compat/fake-rfc2553.c: [Bug 3599194]: compat/fake-rfc2553.c is
	broken.

2013-02-22  Don Porter  <[email protected]>

	* generic/tclAssembly.c:	Shift more burden of smart cleanup
	* generic/tclCompile.c:		onto the TclFreeCompileEnv() routine.
	Stop crashes when the hookProc raises an error.

2013-02-20  Don Porter  <[email protected]>

Changes to compat/fake-rfc2553.c.

80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
		snprintf(tmpserv, sizeof(tmpserv), "%d", ntohs(sin->sin_port));
		if (strlcpy(serv, tmpserv, servlen) >= servlen)
			return (EAI_MEMORY);
	}

	if (host != NULL) {
		if (flags & NI_NUMERICHOST) {
			int len;
			Tcl_MutexLock(&netdbMutex);
			len = strlcpy(host, inet_ntoa(sin->sin_addr), hostlen);
			Tcl_MutexUnlock(&netdbMutex);
			if (len >= hostlen) {
				return (EAI_MEMORY);
			} else {
				return (0);







|







80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
		snprintf(tmpserv, sizeof(tmpserv), "%d", ntohs(sin->sin_port));
		if (strlcpy(serv, tmpserv, servlen) >= servlen)
			return (EAI_MEMORY);
	}

	if (host != NULL) {
		if (flags & NI_NUMERICHOST) {
			size_t len;
			Tcl_MutexLock(&netdbMutex);
			len = strlcpy(host, inet_ntoa(sin->sin_addr), hostlen);
			Tcl_MutexUnlock(&netdbMutex);
			if (len >= hostlen) {
				return (EAI_MEMORY);
			} else {
				return (0);
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
		return ("unknown/invalid error.");
	}
}    
#endif /* !HAVE_GAI_STRERROR */

#ifndef HAVE_FREEADDRINFO
void
freeaddrinfo(struct addrinfo *ai)
{
	struct addrinfo *next;

	for(; ai != NULL;) {
		next = ai->ai_next;
		free(ai);
		ai = next;







|







131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
		return ("unknown/invalid error.");
	}
}    
#endif /* !HAVE_GAI_STRERROR */

#ifndef HAVE_FREEADDRINFO
void
fake_freeaddrinfo(struct addrinfo *ai)
{
	struct addrinfo *next;

	for(; ai != NULL;) {
		next = ai->ai_next;
		free(ai);
		ai = next;
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
	    hints->ai_family != AF_INET)
		return (EAI_FAMILY);
	if (servname != NULL) {
		char *cp;

		port = strtol(servname, &cp, 10);
		if (port > 0 && port <= 65535 && *cp == '\0')
			port = htons(port);
		else if ((sp = getservbyname(servname, NULL)) != NULL)
			port = sp->s_port;
		else
			port = 0;
	}

	if (hints && hints->ai_flags & AI_PASSIVE) {







|







195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
	    hints->ai_family != AF_INET)
		return (EAI_FAMILY);
	if (servname != NULL) {
		char *cp;

		port = strtol(servname, &cp, 10);
		if (port > 0 && port <= 65535 && *cp == '\0')
			port = htons((unsigned short)port);
		else if ((sp = getservbyname(servname, NULL)) != NULL)
			port = sp->s_port;
		else
			port = 0;
	}

	if (hints && hints->ai_flags & AI_PASSIVE) {