printf("0\n");
return;
}
+ SHOW_FLAG(f, CS_FL_DONT_WAKE);
SHOW_FLAG(f, CS_FL_NOLINGER);
SHOW_FLAG(f, CS_FL_NOHALF);
SHOW_FLAG(f, CS_FL_ADDR_FROM_SET);
SHOW_FLAG(f, SI_FL_WAIT_DATA);
SHOW_FLAG(f, SI_FL_ISBACK);
- SHOW_FLAG(f, SI_FL_DONT_WAKE);
SHOW_FLAG(f, SI_FL_INDEP_STR);
SHOW_FLAG(f, SI_FL_SRC_ADDR);
SHOW_FLAG(f, SI_FL_WANT_GET);
CS_FL_NOLINGER = 0x00000008, /* may close without lingering. One-shot. */
CS_FL_NOHALF = 0x00000010, /* no half close, close both sides at once */
+ CS_FL_DONT_WAKE = 0x00000020, /* resync in progress, don't wake up */
};
/* cs_shutr() modes */
/* unused: 0x00000001, 0x00000002 */
SI_FL_WAIT_DATA = 0x00000008, /* stream-int waits for more outgoing data to send */
SI_FL_ISBACK = 0x00000010, /* 0 for front-side SI, 1 for back-side */
- SI_FL_DONT_WAKE = 0x00000020, /* resync in progress, don't wake up */
SI_FL_INDEP_STR = 0x00000040, /* independent streams = don't update rex on write */
SI_FL_SRC_ADDR = 0x00001000, /* get the source ip/port with getsockname */
/* unused: 0x00000200 */
cs_si(s->csb)->state = cs_si(s->csb)->prev_state = SI_ST_INI;
cs_si(s->csb)->err_type = SI_ET_NONE;
- cs_si(s->csb)->flags &= SI_FL_ISBACK | SI_FL_DONT_WAKE; /* we're in the context of process_stream */
+ cs_si(s->csb)->flags &= SI_FL_ISBACK; /* we're in the context of process_stream */
+ s->csb->flags &= CS_FL_ISBACK | CS_FL_DONT_WAKE; /* we're in the context of process_stream */
s->req.flags &= ~(CF_SHUTW|CF_SHUTW_NOW|CF_AUTO_CONNECT|CF_WRITE_ERROR|CF_STREAMER|CF_STREAMER_FAST|CF_NEVER_WAIT|CF_WROTE_DATA);
s->res.flags &= ~(CF_SHUTR|CF_SHUTR_NOW|CF_READ_ATTACHED|CF_READ_ERROR|CF_READ_NOEXP|CF_STREAMER|CF_STREAMER_FAST|CF_WRITE_PARTIAL|CF_NEVER_WAIT|CF_WROTE_DATA|CF_READ_NULL);
s->flags &= ~(SF_DIRECT|SF_ASSIGNED|SF_ADDR_SET|SF_BE_ASSIGNED|SF_FORCE_PRST|SF_IGNORE_PRST);
rqf_last = req->flags & ~CF_MASK_ANALYSER;
rpf_last = res->flags & ~CF_MASK_ANALYSER;
- /* we don't want the stream interface functions to recursively wake us up */
- si_f->flags |= SI_FL_DONT_WAKE;
- si_b->flags |= SI_FL_DONT_WAKE;
+ /* we don't want the conn-stream functions to recursively wake us up */
+ s->csf->flags |= CS_FL_DONT_WAKE;
+ s->csb->flags |= CS_FL_DONT_WAKE;
/* update pending events */
s->pending_events |= (state & TASK_WOKEN_ANY);
!(s->flags & SF_CONN_EXP) &&
!((s->csf->endp->flags | s->csb->flags) & CS_EP_ERROR) &&
((s->pending_events & TASK_WOKEN_ANY) == TASK_WOKEN_TIMER)) {
- si_f->flags &= ~SI_FL_DONT_WAKE;
- si_b->flags &= ~SI_FL_DONT_WAKE;
+ s->csf->flags &= ~CS_FL_DONT_WAKE;
+ s->csb->flags &= ~CS_FL_DONT_WAKE;
goto update_exp_and_leave;
}
}
goto resync_request;
/* we're interested in getting wakeups again */
- si_f->flags &= ~SI_FL_DONT_WAKE;
- si_b->flags &= ~SI_FL_DONT_WAKE;
+ s->csf->flags &= ~CS_FL_DONT_WAKE;
+ s->csb->flags &= ~CS_FL_DONT_WAKE;
/* This is needed only when debugging is enabled, to indicate
* client-side or server-side close. Please note that in the unlikely
s->pending_events = 0;
update_exp_and_leave:
- /* Note: please ensure that if you branch here you disable SI_FL_DONT_WAKE */
+ /* Note: please ensure that if you branch here you disable CS_FL_DONT_WAKE */
t->expire = tick_first((tick_is_expired(t->expire, now_ms) ? 0 : t->expire),
tick_first(tick_first(req->rex, req->wex),
tick_first(res->rex, res->wex)));
}
/* note that if the task exists, it must unregister itself once it runs */
- if (!(si->flags & SI_FL_DONT_WAKE))
+ if (!(si->cs->flags & CS_FL_DONT_WAKE))
task_wakeup(si_task(si), TASK_WOKEN_IO);
}
}
/* note that if the task exists, it must unregister itself once it runs */
- if (!(si->flags & SI_FL_DONT_WAKE))
+ if (!(si->cs->flags & CS_FL_DONT_WAKE))
task_wakeup(si_task(si), TASK_WOKEN_IO);
}
else {
/* (re)start reading */
tasklet_wakeup(si->wait_event.tasklet);
- if (!(si->flags & SI_FL_DONT_WAKE))
+ if (!(si->cs->flags & CS_FL_DONT_WAKE))
task_wakeup(si_task(si), TASK_WOKEN_IO);
}
}
if (!tick_isset(oc->wex))
oc->wex = tick_add_ifset(now_ms, oc->wto);
- if (!(si->flags & SI_FL_DONT_WAKE))
+ if (!(si->cs->flags & CS_FL_DONT_WAKE))
task_wakeup(si_task(si), TASK_WOKEN_IO);
}
((channel_is_empty(oc) && !oc->to_forward) ||
!si_state_in(si->state, SI_SB_EST))))) {
out_wakeup:
- if (!(si->flags & SI_FL_DONT_WAKE))
+ if (!(si->cs->flags & CS_FL_DONT_WAKE))
task_wakeup(si_task(si), TASK_WOKEN_IO);
}
}