Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
15cde4b6
Commit
15cde4b6
authored
Feb 25, 2020
by
Matthieu Schaller
Browse files
When resizin the proxy buffers, do not start from 0 size...
parent
2e9eaaf9
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/proxy.c
View file @
15cde4b6
...
...
@@ -683,6 +683,7 @@ void proxy_parts_exchange_second(struct proxy *p) {
error
(
"Failed to re-allocate parts_in buffers."
);
}
if
(
p
->
nr_gparts_in
>
p
->
size_gparts_in
)
{
if
(
p
->
size_gparts_in
==
0
)
p
->
size_gparts_in
=
proxy_buffinit
;
do
{
p
->
size_gparts_in
*=
proxy_buffgrow
;
}
while
(
p
->
nr_gparts_in
>
p
->
size_gparts_in
);
...
...
@@ -802,6 +803,7 @@ void proxy_gparts_load(struct proxy *p, const struct gpart *gparts, int N) {
/* Is there enough space in the buffer? */
if
(
p
->
nr_gparts_out
+
N
>
p
->
size_gparts_out
)
{
if
(
p
->
size_gparts_out
==
0
)
p
->
size_gparts_out
=
proxy_buffinit
;
do
{
p
->
size_gparts_out
*=
proxy_buffgrow
;
}
while
(
p
->
nr_gparts_out
+
N
>
p
->
size_gparts_out
);
...
...
Write
Preview
Supports
Markdown
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