/* 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_app(struct gnet_dump *d, void *st, int len)
/* 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_app(struct gnet_dump *d, void *st, int len)
{
	if (d->compat_xstats) {
		d->xstats = st;
		d->xstats_len = len;
	}
	if (d->tail)
		return gnet_stats_copy(d, TCA_STATS_APP, st, len);
	return 0;
}