]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - vss.c
string: Introduce arr_alloc().
[paraslash.git] / vss.c
diff --git a/vss.c b/vss.c
index eb51a1b3b64054a2c3f5862cae21ae9a5af99bdb..667d4cac10c69ca0f7e08ee9f20eeec787086d06 100644 (file)
--- a/vss.c
+++ b/vss.c
@@ -335,10 +335,10 @@ static int initialize_fec_client(struct fec_client *fc, struct vss_task *vsst)
        ret = fec_new(k, n, &fc->parms);
        if (ret < 0)
                return ret;
-       fc->src_data = para_malloc(k * sizeof(char *));
+       fc->src_data = arr_alloc(k, sizeof(char *));
        for (i = 0; i < k; i++)
-               fc->src_data[i] = para_malloc(fc->mps);
-       fc->enc_buf = para_malloc(fc->mps);
+               fc->src_data[i] = alloc(fc->mps);
+       fc->enc_buf = alloc(fc->mps);
 
        fc->state = FEC_STATE_READY_TO_RUN;
        fc->next_header_time.tv_sec = 0;
@@ -671,7 +671,7 @@ size_t vss_get_fec_eof_packet(const char **buf)
 struct fec_client *vss_add_fec_client(struct sender_client *sc,
                                      struct fec_client_parms *fcp)
 {
-       struct fec_client *fc = para_calloc(sizeof(*fc));
+       struct fec_client *fc = zalloc(sizeof(*fc));
 
        fc->sc  = sc;
        fc->fcp = fcp;
@@ -845,7 +845,6 @@ static void vss_compute_timeout(struct sched *s, struct vss_task *vsst)
 
 static void vss_eof(struct vss_task *vsst)
 {
-
        if (!vsst->map)
                return;
        if (mmd->new_vss_status_flags & VSS_NOMORE)
@@ -856,8 +855,8 @@ static void vss_eof(struct vss_task *vsst)
        para_munmap(vsst->map, vsst->mapsize);
        vsst->map = NULL;
        mmd->chunks_sent = 0;
-       //mmd->offset = 0;
        mmd->afd.afhi.seconds_total = 0;
+       mmd->afd.afhi.chunks_total = 0;
        mmd->afd.afhi.chunk_tv.tv_sec = 0;
        mmd->afd.afhi.chunk_tv.tv_usec = 0;
        free(mmd->afd.afhi.chunk_table);