Merge remote-tracking branch 'origin/pr/201'

This commit is contained in:
Adam Sutton 2013-01-01 09:28:37 +00:00
commit 2488fe70b3

View file

@ -185,16 +185,12 @@ tcp_write_queue(int fd, htsbuf_queue_t *q)
void *p;
while((hd = TAILQ_FIRST(&q->hq_q)) != NULL) {
TAILQ_REMOVE(&q->hq_q, hd, hd_link);
if (!r) {
l = hd->hd_data_len - hd->hd_data_off;
p = hd->hd_data + hd->hd_data_off;
r = tvh_write(fd, p, l);
}
free(hd->hd_data);
free(hd);
htsbuf_data_free(q, hd);
}
q->hq_size = 0;
return r;