1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

* assuan-connect.c (assuan_pipe_connect): Implemented the inital

handshake.
* assuan-client.c (read_from_server): Renamed to
(_assuan_read_from_server): this and made external.

* assuan-listen.c (assuan_set_hello_line): New.
(assuan_accept): Use a custom hello line is available.

* assuan-buffer.c (assuan_read_line): New.
(assuan_pending_line): New.
(_assuan_write_line): Renamed to ..
(assuan_write_line): this, made public and changed all callers.
This commit is contained in:
Werner Koch 2001-12-12 09:17:23 +00:00
parent 6a8c47bd29
commit d0eb9ade2c
10 changed files with 135 additions and 44 deletions

View file

@ -377,11 +377,11 @@ process_request (ASSUAN_CONTEXT ctx)
/* Error handling */
if (!rc)
{
rc = _assuan_write_line (ctx, "OK");
rc = assuan_write_line (ctx, "OK");
}
else if (rc == -1)
{ /* No error checking because the peer may have already disconnect */
_assuan_write_line (ctx, "OK Bye, bye - hope to meet you again");
assuan_write_line (ctx, "OK Hope to meet you again");
}
else
{
@ -397,7 +397,7 @@ process_request (ASSUAN_CONTEXT ctx)
sprintf (errline, "ERR %d %.50s%s%.100s",
rc, assuan_strerror (rc), text? " - ":"", text?text:"");
}
rc = _assuan_write_line (ctx, errline);
rc = assuan_write_line (ctx, errline);
}
return rc;
@ -538,7 +538,7 @@ assuan_write_status (ASSUAN_CONTEXT ctx, const char *keyword, const char *text)
strcat (buffer, " ");
strcat (buffer, text);
}
_assuan_write_line (ctx, buffer);
assuan_write_line (ctx, buffer);
}
else if ( (helpbuf = xtrymalloc (n)) )
{
@ -549,7 +549,7 @@ assuan_write_status (ASSUAN_CONTEXT ctx, const char *keyword, const char *text)
strcat (helpbuf, " ");
strcat (helpbuf, text);
}
_assuan_write_line (ctx, helpbuf);
assuan_write_line (ctx, helpbuf);
xfree (helpbuf);
}
}