LCOV - code coverage report
Current view: top level - src/server - manios.c (source / functions) Hit Total Coverage
Test: burp-coverage-clean.info Lines: 0 21 0.0 %
Date: 2015-10-31 Functions: 0 3 0.0 %

          Line data    Source code
       1             : #include "../burp.h"
       2             : #include "../alloc.h"
       3             : #include "manios.h"
       4             : #include "manio.h"
       5             : 
       6           0 : static manios *manios_alloc(void)
       7             : {
       8           0 :         return (struct manios *)calloc_w(1, sizeof(struct manios), __func__);
       9             : }
      10             : 
      11           0 : struct manios *manios_open_phase2(struct sdirs *sdirs, man_off_t *p1pos,
      12             :         enum protocol p)
      13             : {
      14           0 :         struct manios *m=NULL;
      15           0 :         if(!(m=manios_alloc())
      16           0 :           || !(m->current=manio_open(sdirs->cmanifest, "rb", p))
      17           0 :           || !(m->phase1=manio_open_phase1(sdirs->phase1data, "rb", p))
      18           0 :           || !(m->changed=manio_open_phase2(sdirs->changed, "ab", p))
      19           0 :           || !(m->unchanged=manio_open_phase2(sdirs->unchanged, "ab", p))
      20           0 :           || (p1pos && manio_seek(m->phase1, p1pos)))
      21           0 :                 manios_close(&m);
      22           0 :         return m;
      23             : }
      24             : 
      25           0 : int manios_close(struct manios **manios)
      26             : {
      27           0 :         int ret=0;
      28           0 :         if(!manios || !*manios) return 0;
      29           0 :         ret|=manio_close(&(*manios)->current);
      30           0 :         ret|=manio_close(&(*manios)->phase1);
      31           0 :         ret|=manio_close(&(*manios)->changed);
      32           0 :         ret|=manio_close(&(*manios)->unchanged);
      33           0 :         free_v((void **)manios);
      34           0 :         return ret;
      35             : }

Generated by: LCOV version 1.10