Removed debug output

This commit is contained in:
Tatsuhiro Tsujikawa 2012-01-27 17:46:56 +09:00
parent 29df087ae8
commit 83b4e245d9
2 changed files with 4 additions and 15 deletions

View File

@ -50,9 +50,7 @@ static void spdylay_frame_pack_ctrl_hd(uint8_t* buf, const spdylay_ctrl_hd *hd)
buf[0] |= 1 << 7;
spdylay_put_uint16be(&buf[2], hd->type);
spdylay_put_uint32be(&buf[4], hd->length);
printf("hd->length=%d\n", hd->length);
buf[4] = hd->flags;
printf("hd->flags=%d\n", hd->flags);
}
static void spdylay_frame_unpack_ctrl_hd(spdylay_ctrl_hd *hd,

View File

@ -447,7 +447,6 @@ static int spdylay_session_after_frame_sent(spdylay_session *session)
int spdylay_session_send(spdylay_session *session)
{
int r;
printf("session_send\n");
while(session->aob.item || !spdylay_pq_empty(&session->ob_pq)) {
const uint8_t *data;
size_t datalen;
@ -682,7 +681,6 @@ int spdylay_session_process_ctrl_frame(spdylay_session *session)
type = ntohs(type);
switch(type) {
case SPDYLAY_SYN_STREAM:
printf("SYN_STREAM\n");
r = spdylay_frame_unpack_syn_stream(&frame.syn_stream,
session->iframe.headbuf,
sizeof(session->iframe.headbuf),
@ -699,7 +697,6 @@ int spdylay_session_process_ctrl_frame(spdylay_session *session)
}
break;
case SPDYLAY_SYN_REPLY:
printf("SYN_REPLY\n");
r = spdylay_frame_unpack_syn_reply(&frame.syn_reply,
session->iframe.headbuf,
sizeof(session->iframe.headbuf),
@ -711,9 +708,6 @@ int spdylay_session_process_ctrl_frame(spdylay_session *session)
spdylay_frame_syn_reply_free(&frame.syn_reply);
}
break;
default:
/* ignore */
printf("Received control frame type %x\n", type);
}
if(r < SPDYLAY_ERR_FATAL) {
return r;
@ -724,23 +718,21 @@ int spdylay_session_process_ctrl_frame(spdylay_session *session)
int spdylay_session_process_data_frame(spdylay_session *session)
{
printf("Received data frame, stream_id %d, %zu bytes, fin=%d\n",
spdylay_get_uint32(session->iframe.headbuf),
session->iframe.len,
session->iframe.headbuf[4] & SPDYLAY_FLAG_FIN);
/* printf("Received data frame, stream_id %d, %zu bytes, fin=%d\n", */
/* spdylay_get_uint32(session->iframe.headbuf), */
/* session->iframe.len, */
/* session->iframe.headbuf[4] & SPDYLAY_FLAG_FIN); */
return 0;
}
int spdylay_session_recv(spdylay_session *session)
{
printf("session_recv\n");
while(1) {
ssize_t r;
if(session->iframe.state == SPDYLAY_RECV_HEAD) {
uint32_t payloadlen;
if(spdylay_inbound_buffer_avail(&session->ibuf) < SPDYLAY_HEAD_LEN) {
r = spdylay_recv(session);
printf("r=%d\n", r);
/* TODO handle EOF */
if(r < 0) {
if(r == SPDYLAY_ERR_WOULDBLOCK) {
@ -749,7 +741,6 @@ int spdylay_session_recv(spdylay_session *session)
return r;
}
}
printf("Recved %d bytes\n", r);
if(spdylay_inbound_buffer_avail(&session->ibuf) < SPDYLAY_HEAD_LEN) {
return 0;
}