/**** SPOP stream flags (32 bit), in spop_strm->flags ****/
#define SPOP_SF_NONE 0x00000000
#define SPOP_SF_ACK_RCVD 0x00000001 /* ACK freme received */
-//#define SPOP_SF_ES_SENT 0x00000002 /* end-of-stream sent */
-//#define SPOP_SF_EP_SENT 0x00000004 /* end-of-param sent */
-//#define SPOP_SF_DISCON_SENT 0x00000008 /* disconnect sent */
/* Stream flags indicating the reason the stream is blocked */
#define SPOP_SF_BLK_MBUSY 0x00000010 /* blocked waiting for mux access (transient) */
#define SPOP_SF_BLK_MROOM 0x00000020 /* blocked waiting for room in the mux */
#define SPOP_SF_BLK_ANY 0x00000030 /* any of the reasons above */
-//#define SPOP_SF_BEGIN_SENT 0x00000100 /* a BEGIN_REQUEST record was sent for this stream */
-//#define SPOP_SF_OUTGOING_DATA 0x00000200 /* set whenever we've seen outgoing data */
#define SPOP_SF_NOTIFIED 0x00000400 /* a paused stream was notified to try to send again */
/* This function is used to report flags in debugging tools. Please reflect
.sd = (struct sedesc *)&closed_ep,
.spop_conn = NULL,
.state = SPOP_SS_CLOSED,
- .flags = SPOP_SF_NONE, // TODO ?
+ .flags = SPOP_SF_NONE,
.id = 0,
};
/* b_del(&spop_conn->dbuf, sent); */
spop_conn->dfl -= sent;
- // TODO: may happen or not ?
- /* /\* call the upper layers to process the frame, then let the upper layer */
- /* * notify the stream about any change. */
- /* *\/ */
- /* if (!spop_strm_sc(spop_strm)) { */
- /* /\* The upper layer has already closed *\/ */
-
- /* } */
if (spop_strm->state == SPOP_SS_OPEN)
spop_strm->state = SPOP_SS_HREM;
else
}
if ((spop_conn->flags & SPOP_CF_ERROR) || spop_conn_read0_pending(spop_conn) ||
- spop_conn->state == SPOP_CS_CLOSED || (spop_conn->flags & SPOP_CF_DISCO_FAILED) /* || */
- /* TODO: no sure ? eb_is_empty(&spop_conn->streams_by_id) */) {
+ spop_conn->state == SPOP_CS_CLOSED || (spop_conn->flags & SPOP_CF_DISCO_FAILED)) {
spop_wake_some_streams(spop_conn, 0);
if (eb_is_empty(&spop_conn->streams_by_id)) {
/* this stream may be blocked waiting for some data to leave, so orphan
* it in this case.
*/
- if (!(spop_conn->flags & (SPOP_CF_ERR_PENDING|SPOP_CF_ERROR)) && // FIXME: Be sure for ERR_PENDING
+ if (!(spop_conn->flags & (SPOP_CF_ERR_PENDING|SPOP_CF_ERROR)) &&
(spop_conn->state != SPOP_CS_CLOSED) &&
(spop_strm->flags & (SPOP_SF_BLK_MBUSY|SPOP_SF_BLK_MROOM)) &&
spop_strm->subs) {
}
}
- if (ret && spop_conn->dsi == spop_strm->id) { // TODO must match the frame id too !!!!
+ if (ret && spop_conn->dsi == spop_strm->id) {
/* demux is blocking on this stream's buffer */
spop_conn->flags &= ~SPOP_CF_DEM_SFULL;
spop_conn_restart_reading(spop_conn, 1);