/* Returns 0 on success or -1 with the statistic lock released if the room in the socket buffer was not sufficient.  */
int gnet_stats_copy_queue(struct gnet_dump *d, struct gnet_stats_queue *q)
/* Returns 0 on success or -1 with the statistic lock released if the room in the socket buffer was not sufficient.  */
int gnet_stats_copy_queue(struct gnet_dump *d, struct gnet_stats_queue *q)
{
	if (d->compat_tc_stats) {
		d->tc_stats.drops = q->drops;
		d->tc_stats.qlen = q->qlen;
		d->tc_stats.backlog = q->backlog;
		d->tc_stats.overlimits = q->overlimits;
	}
	if (d->tail)
		return gnet_stats_copy(d, TCA_STATS_QUEUE, q, sizeof(*q));
	return 0;
}