diff options
author | Xavier Roche <xroche@users.noreply.github.com> | 2013-07-20 07:41:46 +0000 |
---|---|---|
committer | Xavier Roche <xroche@users.noreply.github.com> | 2013-07-20 07:41:46 +0000 |
commit | 8eaf0a1e180e96fc09d88fe90864dfdec53d7360 (patch) | |
tree | c5b4351dd0117086ceaf7b6c26f72fe3e72655a2 | |
parent | 6516c4f306f7772e81e9c906924e97295cb89a89 (diff) |
Refresh stats
-rw-r--r-- | src/htslib.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/htslib.c b/src/htslib.c index 9a48b62..313b2ba 100644 --- a/src/htslib.c +++ b/src/htslib.c @@ -5650,6 +5650,17 @@ HTSEXT_API void hts_free_opt(httrackp * opt) { // TEMPORARY - PUT THIS STRUCTURE INSIDE httrackp ! const hts_stat_struct* hts_get_stats(httrackp * opt) { + if (opt == NULL) { + return NULL; + } + + HTS_STAT.stat_nsocket = 0; + HTS_STAT.stat_errors = fspc(opt, NULL, "error"); + HTS_STAT.stat_warnings = fspc(opt, NULL, "warning"); + HTS_STAT.stat_infos = fspc(opt, NULL, "info"); + HTS_STAT.nbk = 0; + HTS_STAT.nb = 0; + return &HTS_STAT; } |