Skip to content

Commit

Permalink
Remove last-server-read info
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Ortmann committed Jan 3, 2024
1 parent ce9497b commit 8f7fbd8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
9 changes: 1 addition & 8 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ unsigned long itraffic_unknown = 0;
unsigned long itraffic_unknown_today = 0;

#ifdef DEBUG_CONTEXT
extern char last_server_read[];
extern char last_bind_called[];
#endif

Expand Down Expand Up @@ -275,8 +274,6 @@ static void write_debug()
#else
dprintf(-x, "Patch level: %s\n", "stable");
#endif
if (*last_server_read)
dprintf(-x, "Last server read: %s\n", last_server_read);
if (*last_bind_called)
dprintf(-x, "Last bind called: %s\n", last_bind_called);
killsock(x);
Expand All @@ -289,8 +286,6 @@ static void write_debug()
nested_debug = 1;
putlog(LOG_MISC, "*", "* Please report problem to https://github.com/eggheads/eggdrop/issues");
putlog(LOG_MISC, "*", "* Check doc/BUG-REPORT on how to do so.");
if (*last_server_read)
putlog(LOG_MISC, "*", "* Last server read: %s", last_server_read);
if (*last_bind_called)
putlog(LOG_MISC, "*", "* Last bind called: %s", last_bind_called);
x = creat("DEBUG", 0644);
Expand Down Expand Up @@ -348,8 +343,7 @@ static void write_debug()
#ifdef STRIPFLAGS
dprintf(-x, "Strip flags: %s\n", STRIPFLAGS);
#endif
dprintf(-x, "Last server read: %s\n"
"Last bind called: %s\n", last_server_read, last_bind_called);
dprintf(-x, "Last bind called: %s\n", last_bind_called);
tell_dcc(-x);
dprintf(-x, "\n");
debug_mem_to_dcc(-x);
Expand Down Expand Up @@ -436,7 +430,6 @@ static void got_ill(int z)
#ifdef DEBUG_CONTEXT
putlog(LOG_MISC, "*", "* Please REPORT this BUG!");
putlog(LOG_MISC, "*", "* Check doc/BUG-REPORT on how to do so.");
putlog(LOG_MISC, "*", "* Last server read: %s", last_server_read);
putlog(LOG_MISC, "*", "* Last bind called: %s", last_bind_called);
#endif
}
Expand Down
12 changes: 0 additions & 12 deletions src/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ char botuser[USERLEN + 1] = "eggdrop"; /* Username of the user running the bot*/
int dcc_sanitycheck = 0; /* Do some sanity checking on dcc connections. */
sock_list *socklist = NULL; /* Enough to be safe. */
sigjmp_buf alarmret; /* Env buffer for alarm() returns. */
#ifdef DEBUG_CONTEXT
char last_server_read[512] = "";
#endif

/* Types of proxies */
#define PROXY_SOCKS 1
Expand Down Expand Up @@ -1010,15 +1007,6 @@ int sockread(char *s, int *len, sock_list *slist, int slistmax, int tclonly)
}
}
s[x] = 0;
#ifdef DEBUG_CONTEXT
for (int j = 0; j < dcc_total; j++) {
if (dcc[j].sock == slist[i].sock) {
if (dcc[j].type && dcc[j].type->name && !strcmp(dcc[j].type->name, "SERVER"))
strlcpy(last_server_read, s, sizeof last_server_read);
break;
}
}
#endif
*len = x;
if (slist[i].flags & SOCK_PROXYWAIT) {
debug2("net: socket: %d proxy errno: %d", slist[i].sock, s[1]);
Expand Down

0 comments on commit 8f7fbd8

Please sign in to comment.