X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=vss.c;h=4c9f362344ce5bb8c6ae1e6b826fd78aaa140684;hp=aec357ab7e5bdd936e438412a3c94216c72bbff2;hb=985ba0546ab18eadf73d0a2686029a3ac876c846;hpb=58864df1c0784c58e421949b67a091fd0a60e140 diff --git a/vss.c b/vss.c index aec357ab..4c9f3623 100644 --- a/vss.c +++ b/vss.c @@ -565,8 +565,14 @@ static int setup_next_fec_group(struct fec_client *fc, struct vss_task *vsst) if (payload_size < g->slice_bytes) memset(fc->extra_header_buf + payload_size, 0, g->slice_bytes - payload_size); - fc->src_data[i] = fc->extra_header_buf; - assert(i == g->num_header_slices - 1); + /* + * There might be more than one header slice to fill although + * only the first one will be used. Set all header slices to + * our extra buffer. + */ + while (i < g->num_header_slices) + fc->src_data[i++] = fc->extra_header_buf; + break; /* we don't want i to be increased. */ } /* @@ -932,7 +938,7 @@ static void vss_pre_select(struct sched *s, struct task *t) static int recv_afs_msg(int afs_socket, int *fd, uint32_t *code, uint32_t *data) { - char control[255], buf[8]; + char control[255] __a_aligned(8), buf[8]; struct msghdr msg = {.msg_iov = NULL}; struct cmsghdr *cmsg; struct iovec iov;