mirror of
https://github.com/sheumann/telnetd.git
synced 2025-04-13 15:37:09 +00:00
Fix up external variables named "debug" that have a horrible habit
of conflicting with other, similarly named functions in static libraries. This is done mostly by renaming the var if it is shared amongst modules, or making it static otherwise. OK'ed by: re(scottl) git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@114911 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
This commit is contained in:
parent
90a2e082b9
commit
4369ac2a7f
@ -532,11 +532,11 @@ togdebug(void)
|
||||
{
|
||||
#ifndef NOT43
|
||||
if (net > 0 &&
|
||||
(SetSockOpt(net, SOL_SOCKET, SO_DEBUG, debug)) < 0) {
|
||||
(SetSockOpt(net, SOL_SOCKET, SO_DEBUG, telnet_debug)) < 0) {
|
||||
perror("setsockopt (SO_DEBUG)");
|
||||
}
|
||||
#else /* NOT43 */
|
||||
if (debug) {
|
||||
if (telnet_debug) {
|
||||
if (net > 0 && SetSockOpt(net, SOL_SOCKET, SO_DEBUG, 1) < 0)
|
||||
perror("setsockopt (SO_DEBUG)");
|
||||
} else
|
||||
@ -741,7 +741,7 @@ static struct togglelist Togglelist[] = {
|
||||
{ "debug",
|
||||
"debugging",
|
||||
(int (*)(int))togdebug,
|
||||
&debug,
|
||||
&telnet_debug,
|
||||
"turn on socket level debugging" },
|
||||
{ "netdata",
|
||||
"printing of hexadecimal network data (debugging)",
|
||||
@ -2404,7 +2404,7 @@ tn(int argc, char *argv[])
|
||||
}
|
||||
#endif /* defined(IPPROTO_IP) && defined(IP_TOS) */
|
||||
|
||||
if (debug && SetSockOpt(net, SOL_SOCKET, SO_DEBUG, 1) < 0) {
|
||||
if (telnet_debug && SetSockOpt(net, SOL_SOCKET, SO_DEBUG, 1) < 0) {
|
||||
perror("setsockopt (SO_DEBUG)");
|
||||
}
|
||||
|
||||
|
@ -127,7 +127,7 @@ extern int
|
||||
netdata, /* Print out network data flow */
|
||||
prettydump, /* Print "netdata" output in user readable format */
|
||||
termdata, /* Print out terminal data flow */
|
||||
debug, /* Debug level */
|
||||
telnet_debug, /* Debug level */
|
||||
doaddrlookup, /* do a reverse lookup? */
|
||||
clienteof; /* Client received EOF */
|
||||
|
||||
|
@ -213,7 +213,7 @@ main(int argc, char *argv[])
|
||||
skiprc = 1;
|
||||
break;
|
||||
case 'd':
|
||||
debug = 1;
|
||||
telnet_debug = 1;
|
||||
break;
|
||||
case 'e':
|
||||
set_escape_char(optarg);
|
||||
|
@ -95,7 +95,7 @@ int
|
||||
connected,
|
||||
showoptions,
|
||||
ISend, /* trying to send network data in */
|
||||
debug = 0,
|
||||
telnet_debug = 0,
|
||||
crmod,
|
||||
netdata, /* Print out network data flow */
|
||||
crlf, /* Should '\r' be mapped to <CR><LF> (or <CR><NUL>)? */
|
||||
|
@ -78,7 +78,7 @@ int terminaltypeok(char *);
|
||||
|
||||
int hostinfo = 1; /* do we print login banner? */
|
||||
|
||||
int debug = 0;
|
||||
static int debug = 0;
|
||||
int keepalive = 1;
|
||||
const char *altlogin;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user