Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-tus
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-tus
Commits
1763d2d8
Unverified
Commit
1763d2d8
authored
Sep 09, 2021
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Single fcore reference for tus_file_final_birth()
parent
345a6d35
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
8 deletions
+9
-8
tus_file.c
src/tus_file.c
+6
-4
tus_file.h
src/tus_file.h
+1
-2
tus_request.c
src/tus_request.c
+2
-2
No files found.
src/tus_file.c
View file @
1763d2d8
...
...
@@ -204,14 +204,16 @@ tus_file_final_concat(struct VPFX(tus_server) *srv,
return
(
NULL
);
}
struct
tus_file_core
*
tus_file_final_birth
(
struct
tus_file_core
*
fcore
,
struct
concat_embryo
*
embryo
)
void
tus_file_final_birth
(
struct
tus_file_core
**
fcorep
,
struct
concat_embryo
*
embryo
)
{
struct
tus_file_core
*
fcore
;
struct
VPFX
(
tus_server
)
*
srv
;
struct
tus_file_disk
*
fdisk
;
struct
vsb
*
vsb
;
CHECK_OBJ_NOTNULL
(
fcore
,
VMOD_TUS_FILE_CORE_MAGIC
);
TAKE_OBJ_NOTNULL
(
fcore
,
fcorep
,
VMOD_TUS_FILE_CORE_MAGIC
);
CHECK_OBJ_NOTNULL
(
embryo
,
CONCAT_EMBRYO_MAGIC
);
fdisk
=
fcore
->
disk
;
CHECK_OBJ_NOTNULL
(
fdisk
,
VMOD_TUS_FILE_DISK_MAGIC
);
...
...
@@ -232,7 +234,7 @@ tus_file_final_birth(struct tus_file_core *fcore, struct concat_embryo *embryo)
}
VSB_destroy
(
&
vsb
);
memset
(
embryo
,
0
,
sizeof
*
embryo
);
return
(
fcore
)
;
*
fcorep
=
fcore
;
}
static
void
...
...
src/tus_file.h
View file @
1763d2d8
...
...
@@ -168,8 +168,7 @@ struct concat_embryo * tus_file_final_concat(struct VPFX(tus_server) *,
struct
concat_embryo
*
,
const
char
*
);
VCL_BLOB
tus_concat_hash
(
VRT_CTX
,
const
struct
VPFX
(
tus_server
)
*
,
const
struct
tus_concat
*
);
struct
tus_file_core
*
tus_file_final_birth
(
struct
tus_file_core
*
,
struct
concat_embryo
*
);
void
tus_file_final_birth
(
struct
tus_file_core
**
,
struct
concat_embryo
*
);
void
tus_file_final_abort
(
struct
concat_embryo
*
);
VCL_BOOL
tus_file_done
(
struct
tus_file_core
*
,
struct
tus_file_disk
*
,
const
char
*
);
...
...
src/tus_request.c
View file @
1763d2d8
...
...
@@ -351,8 +351,8 @@ tus_request(VRT_CTX, struct VPFX(tus_server) *tussrv,
if
(
r
->
fcore
==
NULL
)
{
tus_file_final_abort
(
&
embryo
);
}
else
{
r
->
fcore
=
tus_file_final_birth
(
r
->
fcore
,
&
embryo
);
r
->
status
=
201
;
tus_file_final_birth
(
&
r
->
fcore
,
&
embryo
);
r
->
status
=
r
->
fcore
?
201
:
500
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment