aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/c/driver.c
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-04-25 14:35:49 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-04-25 14:35:49 -0400
commit3d0a7f3cd81daaa7d49de95de7fe4eb8d1288876 (patch)
tree71212823b38e6c57adf86e66184c7c6a00c451bc /src/c/driver.c
parent2dd6e83e23759ef4f5a27e399e43636881449345 (diff)
Only allow single-file upload per control
Diffstat (limited to 'src/c/driver.c')
-rw-r--r--src/c/driver.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/c/driver.c b/src/c/driver.c
index fa4f474b..6e06f32b 100644
--- a/src/c/driver.c
+++ b/src/c/driver.c
@@ -393,14 +393,9 @@ static void *worker(void *data) {
part += boundary_len;
if (filename) {
- uw_Basis_file *f = malloc(sizeof(uw_Basis_file));
- uw_Basis_files fs = { 1, f };
+ uw_Basis_file f = {filename, {part_len, after_sub_headers}};
- f->name = filename;
- f->data.size = part_len;
- f->data.data = after_sub_headers;
-
- uw_set_file_input(ctx, name, fs);
+ uw_set_file_input(ctx, name, f);
} else
uw_set_input(ctx, name, after_sub_headers);
}