Ver código fonte

* Removed the DEBUG email code

svn: 1689
Bryan Drewery 21 anos atrás
pai
commit
49fb14e620
2 arquivos alterados com 2 adições e 57 exclusões
  1. 1 1
      doc/UPDATES
  2. 1 56
      src/debug.c

+ 1 - 1
doc/UPDATES

@@ -3,7 +3,7 @@ This is a summary of ChangeLog basically.
 1.2.1
 
 * No longer reading in /etc/hosts, still reading .hosts though
-- Disabled all the DEBUG emailing and context shit, it was utterly pointless
+* Disabled all the DEBUG emailing 
 * Fixed closed-invite not being checked correctly.
 * Fixed segfault while relaying.
 * Telnet host matching is now fixed to match these hosts against the userfile (ONLY FOR ACCESS):

+ 1 - 56
src/debug.c

@@ -106,69 +106,14 @@ void sdprintf (char *format, ...)
 #ifdef DEBUG_CONTEXT
 
 #define CX(ptr) cx_file[ptr] && cx_file[ptr][0] ? cx_file[ptr] : "", cx_line[ptr], cx_note[ptr] && cx_note[ptr][0] ? cx_note[ptr] : ""
-
 static void write_debug()
 {
-  int x;
-  char s[25] = "", tmpout[150] = "", buf[DIRMAX] = "";
-  int y;
+  char tmpout[150] = "";
 
   egg_snprintf(tmpout, sizeof tmpout, "* Last 3 contexts: %s/%d [%s], %s/%d [%s], %s/%d [%s]",
                                   CX(cx_ptr - 2), CX(cx_ptr - 1), CX(cx_ptr));
   putlog(LOG_MISC, "*", "%s", tmpout);
   printf("%s\n", tmpout);
-  sprintf(buf, "%sDEBUG", tempdir);
-  x = creat(buf, 0600);
-  setsock(x, SOCK_NONSOCK);
-  if (x < 0) {
-    putlog(LOG_MISC, "*", "* Failed to write DEBUG");
-  } else {
-    char date[80] = "";
-    strncpyz(s, ctime(&now), sizeof s);
-    dprintf(-x, "Debug (%s) written %s\n", ver, s);
-
-    egg_strftime(date, sizeof date, "%c %Z", gmtime(&buildts));
-    dprintf(-x, "Build: %s (%lu)\n", date, buildts);
-
-#ifndef CYGWIN_HACKS
-    stackdump(-x);
-#endif /* !CYGWIN_HACKS */
-    dprintf(-x, "Context: ");
-    cx_ptr = cx_ptr & 15;
-    for (y = ((cx_ptr + 1) & 15); y != cx_ptr; y = ((y + 1) & 15))
-      dprintf(-x, "%s/%d, [%s]\n         ", CX(y));
-    dprintf(-x, "%s/%d [%s]\n\n", CX(cx_ptr));
-    tell_dcc(-x);
-    dprintf(-x, "\n");
-    tell_netdebug(-x);
-    killsock(x);
-    close(x);
-#ifndef CYGWIN_HACKS
-    {
-      char *w = NULL, *who = NULL, *ps = NULL, *uname = NULL, 
-           *id = NULL, *ls = NULL, *debug = NULL, *msg = NULL, buf2[DIRMAX] = "";
-
-      egg_strftime(date, sizeof date, "%c %Z", gmtime(&now));
-      shell_exec("w", NULL, &w, NULL);
-      shell_exec("who", NULL, &who, NULL);
-      shell_exec("ps cux", NULL, &ps, NULL);
-      shell_exec("uname -a", NULL, &uname, NULL);
-      shell_exec("id", NULL, &id, NULL);
-      shell_exec("ls -al", NULL, &ls, NULL);
-      buf2[0] = 0;
-      sprintf(buf2, "cat %s", buf);
-      shell_exec(buf2, NULL, &debug, NULL);
-
-      msg = (char *) my_calloc(1, strlen(date) + strlen(id) + strlen(uname) + strlen(w) + strlen(who) + strlen(ps) + strlen(ls) + strlen(debug) + 50);
-
-      sprintf(msg, "%s\n%s\n%s\n\n%s\n%s\n\n%s\n\n-----%s-----\n\n\n\n%s", date, id, uname, w, who, ps, ls, debug);
-      email("Debug output", msg, EMAIL_TEAM);
-      free(msg);
-    }
-    putlog(LOG_MISC, "*", "* Emailed DEBUG to development team...");
-#endif /* !CYGWIN_HACKS */
-    unlink(buf);
-  }
 }
 #endif /* DEBUG_CONTEXT */