[MEDIUM] started the changes towards I/O completion callbacks
Now the event_* functions find their buffer in the fdtab itself.
diff --git a/src/stream_sock.c b/src/stream_sock.c
index 1c7fa59..5e01da2 100644
--- a/src/stream_sock.c
+++ b/src/stream_sock.c
@@ -46,8 +46,8 @@
*/
int event_cli_read(int fd) {
struct task *t = fdtab[fd].owner;
+ struct buffer *b = fdtab[fd].cb[DIR_RD].b;
struct session *s = t->context;
- struct buffer *b = s->req;
int ret, max;
#ifdef DEBUG_FULL
@@ -151,8 +151,8 @@
*/
int event_cli_write(int fd) {
struct task *t = fdtab[fd].owner;
+ struct buffer *b = fdtab[fd].cb[DIR_WR].b;
struct session *s = t->context;
- struct buffer *b = s->rep;
int ret, max;
#ifdef DEBUG_FULL
@@ -243,8 +243,8 @@
*/
int event_srv_read(int fd) {
struct task *t = fdtab[fd].owner;
+ struct buffer *b = fdtab[fd].cb[DIR_RD].b;
struct session *s = t->context;
- struct buffer *b = s->rep;
int ret, max;
#ifdef DEBUG_FULL
@@ -348,8 +348,8 @@
*/
int event_srv_write(int fd) {
struct task *t = fdtab[fd].owner;
+ struct buffer *b = fdtab[fd].cb[DIR_WR].b;
struct session *s = t->context;
- struct buffer *b = s->req;
int ret, max;
#ifdef DEBUG_FULL