2
0
Fork 0

con_get() now increases array size in steps of 10

This commit is contained in:
Thomas Porzelt 2008-08-05 18:52:08 +02:00
parent 1844a53dd3
commit c2e6044315
1 changed files with 2 additions and 1 deletions

View File

@ -72,7 +72,8 @@ static connection* con_get(server *srv) {
if (srv->connections_active >= srv->connections->len) {
con = connection_new(srv);
con->idx = srv->connections_active++;
g_array_append_val(srv->connections, con);
g_array_set_size(srv->connections, srv->connections->len + 10);
g_array_index(srv->connections, connection*, con->idx) = con;
} else {
con = g_array_index(srv->connections, connection*, srv->connections_active++);
}