Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Aug 2011 12:29:20 GMT
From:      Catalin Nicutar <cnicutar@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 197913 for review
Message-ID:  <201108201229.p7KCTKcs038772@skunkworks.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@197913?ac=10

Change 197913 by cnicutar@cnicutar_cronos on 2011/08/20 12:28:18

	Add conditional compilation for UTO support in telnet.

Affected files ...

.. //depot/projects/soc2011/cnicutar_tcputo_9/src/contrib/telnet/telnet/commands.c#3 edit
.. //depot/projects/soc2011/cnicutar_tcputo_9/src/contrib/telnet/telnetd/telnetd.c#3 edit

Differences ...

==== //depot/projects/soc2011/cnicutar_tcputo_9/src/contrib/telnet/telnet/commands.c#3 (text+ko) ====

@@ -924,6 +924,7 @@
 void
 set_timeout(char *s)
 {
+#ifdef TCP_SNDUTO_TIMEOUT
 	if (s == NULL) {
 		uto = 0;
 		/* There is not way to "take it back". */
@@ -934,6 +935,9 @@
 	if (uto && net > 0 && setsockopt(net, IPPROTO_TCP, TCP_SNDUTO_TIMEOUT,
 	    &uto, sizeof(uto)))
 		perror("setsockopt UTO");
+#else
+	fprintf(stderr, "Warning: UTO not supported. timeout ignored\n");
+#endif
 }
 
 static int

==== //depot/projects/soc2011/cnicutar_tcputo_9/src/contrib/telnet/telnetd/telnetd.c#3 (text+ko) ====

@@ -288,8 +288,12 @@
 			break;
 
 		case 't':
+#ifdef TCP_RCVUTO_TIMEOUT
 			 /* Enable TCP_RCVUTO_TIMEOUT after authentication.*/
 			uto = 1;
+#else
+			warnx("UTO not supported.");
+#endif
 			break;
 
 		case 'u':



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201108201229.p7KCTKcs038772>