fix commit that should nto have happened

This commit is contained in:
Mark 2004-02-07 23:47:56 +00:00
parent 6787bc18a2
commit e709b0fc0f
2 changed files with 2 additions and 6 deletions

4
sock.c
View file

@ -663,7 +663,6 @@ sql_accept_conn(int srvfd)
} }
else else
{ {
#if 0 //def HAVE_INET_NTOP
inet_ntop(AF_INET, &newui->cliskt.sin_addr.s_addr, tmp, 16); inet_ntop(AF_INET, &newui->cliskt.sin_addr.s_addr, tmp, 16);
if (!match(me.sqlhost, tmp)) { if (!match(me.sqlhost, tmp)) {
/* we didnt get a match, bye bye */ /* we didnt get a match, bye bye */
@ -672,7 +671,6 @@ sql_accept_conn(int srvfd)
free(newui); free(newui);
return; return;
} }
#endif
/* inc number ui, then init new ui */ /* inc number ui, then init new ui */
flags = fcntl(newui->fd, F_GETFL, 0); flags = fcntl(newui->fd, F_GETFL, 0);
flags |= O_NONBLOCK; flags |= O_NONBLOCK;
@ -683,9 +681,7 @@ sql_accept_conn(int srvfd)
newui->nbyteout = 0; newui->nbyteout = 0;
newuinode = lnode_create(newui); newuinode = lnode_create(newui);
list_append(sqlconnections, newuinode); list_append(sqlconnections, newuinode);
#if 0 //def HAVE_INET_NTOP
inet_ntop(AF_INET, &newui->cliskt.sin_addr.s_addr, tmp, 16); inet_ntop(AF_INET, &newui->cliskt.sin_addr.s_addr, tmp, 16);
#endif
nlog(LOG_DEBUG1, LOG_CORE, "New SqlConnection from %s", tmp); nlog(LOG_DEBUG1, LOG_CORE, "New SqlConnection from %s", tmp);
} }
} }

View file

@ -14,6 +14,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> /* for mkstemp() */ #include <stdlib.h> /* for mkstemp() */
#include <libgen.h> /* for dirname() */
#include <string.h> /* for strlen() */ #include <string.h> /* for strlen() */
#include <limits.h> /* for PATH_MAX */ #include <limits.h> /* for PATH_MAX */
#ifdef SYSLOG #ifdef SYSLOG
@ -531,8 +532,7 @@ rta_save(TBLDEF *ptbl, char *fname)
/* Open a temp file in the same directory as the users target file */ /* Open a temp file in the same directory as the users target file */
(void) strncpy(path, fname, PATH_MAX); (void) strncpy(path, fname, PATH_MAX);
// (void) strncpy(tfile, dirname(path), PATH_MAX); (void) strncpy(tfile, dirname(path), PATH_MAX);
(void) strncpy(tfile, path, PATH_MAX);
(void) strcat(tfile, "/tmpXXXXXX"); (void) strcat(tfile, "/tmpXXXXXX");
fd = mkstemp(tfile); fd = mkstemp(tfile);
if (fd < 0) if (fd < 0)