net: Remove networking headers from para.h.
[paraslash.git] / vss.c
diff --git a/vss.c b/vss.c
index aec357ab7e5bdd936e438412a3c94216c72bbff2..2349b0931cfcc22b4d54b01f6c26f6b545614e6a 100644 (file)
--- a/vss.c
+++ b/vss.c
  * senders.
  */
 
+#include <sys/socket.h>
+#include <netinet/in.h>
 #include <regex.h>
 #include <osl.h>
+#include <sys/types.h>
+#include <arpa/inet.h>
+#include <sys/un.h>
+#include <netdb.h>
 
 #include "para.h"
 #include "error.h"
@@ -565,8 +571,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. */
        }
 
        /*