Commit 6349196e authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(isc_putc): Handle struct isc_scb_internal.

(isc_write): Handle struct isc_scb_internal.
parent 3bb04699
......@@ -40,17 +40,20 @@
#include "s-string.h"
#include "isc.h"
#include "intern.h"
int
isc_putc(int chr,
struct isc_scb *scb)
struct isc_scb *session)
{
struct isc_scb_internal *scb = (struct isc_scb_internal*)session;
if (scb->state != ISC_STATE_DISABLED &&
scb->state != ISC_STATE_RUNNING)
return EOF;
while (scb->sendindex == sizeof(scb->sendbuf))
isc_flush(scb);
isc_flush(session);
return scb->sendbuf[scb->sendindex++] = chr;
}
......@@ -58,7 +61,7 @@ isc_putc(int chr,
int
isc_write(struct isc_scb * scb,
isc_write(struct isc_scb *session,
const void * buffer,
size_t length)
{
......@@ -66,6 +69,7 @@ isc_write(struct isc_scb * scb,
int len;
int blen;
int clen;
struct isc_scb_internal *scb = (struct isc_scb_internal*)session;
if (scb->state != ISC_STATE_DISABLED &&
......@@ -82,7 +86,7 @@ isc_write(struct isc_scb * scb,
/* Make room in sendbuf */
while (blen == 0)
{
isc_flush(scb);
isc_flush(&scb->pub);
blen = sizeof(scb->sendbuf) - scb->sendindex;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment