mirror of
https://github.com/bstansell/conserver.git
synced 2025-03-24 21:05:19 +00:00
Merge 6093e2e0831fe90a138bd647716b91f7de0f9040 into 290933b4a7964d56f74d2e3c61f7045c5e0d6bfe
This commit is contained in:
commit
f85ba65787
@ -618,19 +618,19 @@ FileOpenFD(int fd, enum consFileType type)
|
||||
#if DEBUG_CONSFILE_IO
|
||||
{
|
||||
char buf[1024];
|
||||
sprintf(buf, "CONSFILE-%s-%lu-%d.w", progname,
|
||||
snprintf(buf, sizeof(buf), "CONSFILE-%s-%lu-%d.w", progname,
|
||||
(unsigned long)thepid, fd);
|
||||
if ((cfp->debugwfd =
|
||||
open(buf, O_WRONLY | O_CREAT | O_APPEND, 0644)) != -1) {
|
||||
sprintf(buf, "[---- STARTED - %s ----]\n",
|
||||
snprintf(buf, sizeof(buf), "[---- STARTED - %s ----]\n",
|
||||
StrTime((time_t *)0));
|
||||
write(cfp->debugwfd, buf, strlen(buf));
|
||||
}
|
||||
sprintf(buf, "CONSFILE-%s-%lu-%d.r", progname,
|
||||
snprintf(buf, sizeof(buf), "CONSFILE-%s-%lu-%d.r", progname,
|
||||
(unsigned long)thepid, fd);
|
||||
if ((cfp->debugrfd =
|
||||
open(buf, O_WRONLY | O_CREAT | O_APPEND, 0644)) != -1) {
|
||||
sprintf(buf, "[---- STARTED - %s ----]\n",
|
||||
snprintf(buf, sizeof(buf), "[---- STARTED - %s ----]\n",
|
||||
StrTime((time_t *)0));
|
||||
write(cfp->debugrfd, buf, strlen(buf));
|
||||
}
|
||||
@ -663,19 +663,19 @@ FileOpenPipe(int fd, int fdout)
|
||||
#if DEBUG_CONSFILE_IO
|
||||
{
|
||||
char buf[1024];
|
||||
sprintf(buf, "CONSFILE-%s-%lu-%d.w", progname,
|
||||
snprintf(buf, sizeof(buf), "CONSFILE-%s-%lu-%d.w", progname,
|
||||
(unsigned long)thepid, fdout);
|
||||
if ((cfp->debugwfd =
|
||||
open(buf, O_WRONLY | O_CREAT | O_APPEND, 0644)) != -1) {
|
||||
sprintf(buf, "[---- STARTED - %s ----]\n",
|
||||
snprintf(buf, sizeof(buf), "[---- STARTED - %s ----]\n",
|
||||
StrTime((time_t *)0));
|
||||
write(cfp->debugwfd, buf, strlen(buf));
|
||||
}
|
||||
sprintf(buf, "CONSFILE-%s-%lu-%d.r", progname,
|
||||
snprintf(buf, sizeof(buf), "CONSFILE-%s-%lu-%d.r", progname,
|
||||
(unsigned long)thepid, fd);
|
||||
if ((cfp->debugrfd =
|
||||
open(buf, O_WRONLY | O_CREAT | O_APPEND, 0644)) != -1) {
|
||||
sprintf(buf, "[---- STARTED - %s ----]\n",
|
||||
snprintf(buf, sizeof(buf), "[---- STARTED - %s ----]\n",
|
||||
StrTime((time_t *)0));
|
||||
write(cfp->debugrfd, buf, strlen(buf));
|
||||
}
|
||||
@ -754,19 +754,19 @@ FileOpen(const char *path, int flag, int mode)
|
||||
#if DEBUG_CONSFILE_IO
|
||||
{
|
||||
char buf[1024];
|
||||
sprintf(buf, "CONSFILE-%s-%lu-%d.w", progname,
|
||||
snprintf(buf, sizeof(buf), "CONSFILE-%s-%lu-%d.w", progname,
|
||||
(unsigned long)thepid, fd);
|
||||
if ((cfp->debugwfd =
|
||||
open(buf, O_WRONLY | O_CREAT | O_APPEND, 0644)) != -1) {
|
||||
sprintf(buf, "[---- STARTED - %s ----]\n",
|
||||
snprintf(buf, sizeof(buf), "[---- STARTED - %s ----]\n",
|
||||
StrTime((time_t *)0));
|
||||
write(cfp->debugwfd, buf, strlen(buf));
|
||||
}
|
||||
sprintf(buf, "CONSFILE-%s-%lu-%d.r", progname,
|
||||
snprintf(buf, sizeof(buf), "CONSFILE-%s-%lu-%d.r", progname,
|
||||
(unsigned long)thepid, fd);
|
||||
if ((cfp->debugrfd =
|
||||
open(buf, O_WRONLY | O_CREAT | O_APPEND, 0644)) != -1) {
|
||||
sprintf(buf, "[---- STARTED - %s ----]\n",
|
||||
snprintf(buf, sizeof(buf), "[---- STARTED - %s ----]\n",
|
||||
StrTime((time_t *)0));
|
||||
write(cfp->debugrfd, buf, strlen(buf));
|
||||
}
|
||||
|
@ -2569,7 +2569,7 @@ TelOpt(int o)
|
||||
if (o < sizeof(telopts) / sizeof(char *))
|
||||
return telopts[o];
|
||||
else {
|
||||
sprintf(opt, "%d", o);
|
||||
snprintf(opt, sizeof(opt), "%d", o);
|
||||
return opt;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user