projects
/
u
/
mdw
/
catacomb
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
2730bf3
)
Various fixes tracking mLib changes.
author
mdw
<mdw>
Sun, 13 Jan 2002 13:50:42 +0000
(13:50 +0000)
committer
mdw
<mdw>
Sun, 13 Jan 2002 13:50:42 +0000
(13:50 +0000)
pixie.c
patch
|
blob
|
blame
|
history
diff --git
a/pixie.c
b/pixie.c
index
f2a3b2f
..
a1d1e2a
100644
(file)
--- a/
pixie.c
+++ b/
pixie.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: pixie.c,v 1.1
1 2002/01/13 13:43:05
mdw Exp $
+ * $Id: pixie.c,v 1.1
2 2002/01/13 13:50:42
mdw Exp $
*
* Passphrase pixie for Catacomb
*
*
* Passphrase pixie for Catacomb
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: pixie.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: pixie.c,v $
+ * Revision 1.12 2002/01/13 13:50:42 mdw
+ * Various fixes tracking mLib changes.
+ *
* Revision 1.11 2002/01/13 13:43:05 mdw
* Fix bug in daemon mode.
*
* Revision 1.11 2002/01/13 13:43:05 mdw
* Fix bug in daemon mode.
*
@@
-172,7
+175,7
@@
static void log(const char *p, ...)
d.len += strftime(d.buf, d.sz, "%Y-%m-%d %H:%M:%S ", tm);
}
va_start(ap, p);
d.len += strftime(d.buf, d.sz, "%Y-%m-%d %H:%M:%S ", tm);
}
va_start(ap, p);
- dstr_vputf(&d, p, ap);
+ dstr_vputf(&d, p,
&
ap);
va_end(ap);
if (flags & F_SYSLOG)
va_end(ap);
if (flags & F_SYSLOG)
@@
-658,7
+661,7
@@
static void pixserv_write(pixserv *px, const char *p, ...)
va_list ap;
va_start(ap, p);
va_list ap;
va_start(ap, p);
- dstr_vputf(&d, p, ap);
+ dstr_vputf(&d, p,
&
ap);
write(px->fd, d.buf, d.len);
va_end(ap);
dstr_destroy(&d);
write(px->fd, d.buf, d.len);
va_end(ap);
dstr_destroy(&d);
@@
-696,6
+699,7
@@
static unsigned long pixserv_timeout(const char *p)
/* --- @pixserv_line@ --- *
*
* Arguments: @char *s@ = pointer to the line read
/* --- @pixserv_line@ --- *
*
* Arguments: @char *s@ = pointer to the line read
+ * @size_t len@ = length of the line
* @void *p@ = pointer to server block
*
* Returns: ---
* @void *p@ = pointer to server block
*
* Returns: ---
@@
-703,7
+707,7
@@
static unsigned long pixserv_timeout(const char *p)
* Use: Handles a line read from the client.
*/
* Use: Handles a line read from the client.
*/
-static void pixserv_line(char *s, void *p)
+static void pixserv_line(char *s,
size_t len,
void *p)
{
pixserv *px = p;
char *q, *qq;
{
pixserv *px = p;
char *q, *qq;
@@
-1087,21
+1091,19
@@
static unsigned c_flags = 0;
/* --- Line handler functions --- */
/* --- Line handler functions --- */
-static void c_uline(char *s, void *p)
+static void c_uline(char *s,
size_t len,
void *p)
{
{
- size_t sz;
if (!s) {
selbuf_destroy(&c_client);
shutdown(c_server.reader.fd, 1);
c_flags |= cf_uclose;
} else {
if (!s) {
selbuf_destroy(&c_client);
shutdown(c_server.reader.fd, 1);
c_flags |= cf_uclose;
} else {
- sz = strlen(s);
- s[sz++] = '\n';
- write(c_server.reader.fd, s, sz);
+ s[len++] = '\n';
+ write(c_server.reader.fd, s, len);
}
}
}
}
-static void c_sline(char *s, void *p)
+static void c_sline(char *s,
size_t len,
void *p)
{
if (!s) {
selbuf_destroy(&c_server);
{
if (!s) {
selbuf_destroy(&c_server);