Quellcode durchsuchen

* Fixed too many open files bug

svn: 750
Bryan Drewery vor 22 Jahren
Ursprung
Commit
ec5af43a96
3 geänderte Dateien mit 5 neuen und 5 gelöschten Zeilen
  1. 1 0
      doc/UPDATES
  2. 4 4
      src/mod/server.mod/servmsg.c
  3. 0 1
      src/shell.c

+ 1 - 0
doc/UPDATES

@@ -10,6 +10,7 @@ This is a summary of ChangeLog basically.
 7.And if no bots are listed, the bot nows gives an error.
 8.cmd_quit was not returning from 'su' correctly.
 9.Fixed bots mass sending out CONFIG entries when they linked.
+10.Fixed some bugs in writing to server (caused too many open files errors)
 
 1.1.0
 1.Rewrote the shell config parsing...

+ 4 - 4
src/mod/server.mod/servmsg.c

@@ -255,7 +255,7 @@ static void nuke_server(char *reason)
 {
   if (serv >= 0) {
     if (reason && (servidx > 0)) 
-      dprintf(servidx, "QUIT :%s\r\n", reason);
+      dprintf(servidx, "QUIT :%s\n", reason);
     disconnect_server(servidx, DO_LOST);
   }
 }
@@ -1285,9 +1285,9 @@ static void server_resolve_success(int idx)
     /* Start alternate nicks from the beginning */
     altnick_char = 0;
 
-    if (pass[0]) dprintf(DP_MODE, "PASS %s\r\n", pass);
-    dprintf(DP_MODE, "NICK %s\r\n", botname);
-    dprintf(DP_MODE, "USER %s localhost %s :%s\r\n", botuser, dcc[idx].host, botrealname);
+    if (pass[0]) dprintf(DP_MODE, "PASS %s\n", pass);
+    dprintf(DP_MODE, "NICK %s\n", botname);
+    dprintf(DP_MODE, "USER %s localhost %s :%s\n", botuser, dcc[idx].host, botrealname);
     /* Wait for async result now */
   }
 }

+ 0 - 1
src/shell.c

@@ -910,7 +910,6 @@ void crontab_create(int interval) {
   FILE *f = NULL;
   int fd;
 
-  /* always use mkstemp() when handling temp files! -dizz */
   egg_snprintf(tmpfile, sizeof tmpfile, "%s.crontab-XXXXXX", tempdir);
   if ((fd = mkstemp(tmpfile)) == -1) {
     unlink(tmpfile);