From e709b0fc0f99c16f3f680d157b786516134dfc7b Mon Sep 17 00:00:00 2001 From: Mark <> Date: Sat, 7 Feb 2004 23:47:56 +0000 Subject: [PATCH] fix commit that should nto have happened --- sock.c | 4 ---- sqlsrv/api.c | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/sock.c b/sock.c index 2d5bbfa9..5c127b01 100644 --- a/sock.c +++ b/sock.c @@ -663,7 +663,6 @@ sql_accept_conn(int srvfd) } else { -#if 0 //def HAVE_INET_NTOP inet_ntop(AF_INET, &newui->cliskt.sin_addr.s_addr, tmp, 16); if (!match(me.sqlhost, tmp)) { /* we didnt get a match, bye bye */ @@ -672,7 +671,6 @@ sql_accept_conn(int srvfd) free(newui); return; } -#endif /* inc number ui, then init new ui */ flags = fcntl(newui->fd, F_GETFL, 0); flags |= O_NONBLOCK; @@ -683,9 +681,7 @@ sql_accept_conn(int srvfd) newui->nbyteout = 0; newuinode = lnode_create(newui); list_append(sqlconnections, newuinode); -#if 0 //def HAVE_INET_NTOP inet_ntop(AF_INET, &newui->cliskt.sin_addr.s_addr, tmp, 16); -#endif nlog(LOG_DEBUG1, LOG_CORE, "New SqlConnection from %s", tmp); } } diff --git a/sqlsrv/api.c b/sqlsrv/api.c index db9cee5e..642f025f 100644 --- a/sqlsrv/api.c +++ b/sqlsrv/api.c @@ -14,6 +14,7 @@ #include #include /* for mkstemp() */ +#include /* for dirname() */ #include /* for strlen() */ #include /* for PATH_MAX */ #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 */ (void) strncpy(path, fname, PATH_MAX); -// (void) strncpy(tfile, dirname(path), PATH_MAX); - (void) strncpy(tfile, path, PATH_MAX); + (void) strncpy(tfile, dirname(path), PATH_MAX); (void) strcat(tfile, "/tmpXXXXXX"); fd = mkstemp(tfile); if (fd < 0)