mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-09-21 13:34:59 +02:00
We need to call get_connection_array before using its outputs
svn:r513
This commit is contained in:
parent
2da3e4da0d
commit
d0273ee135
@ -581,6 +581,7 @@ connection_t *connection_get_by_type_state(int type, int state) {
|
|||||||
connection_t *conn;
|
connection_t *conn;
|
||||||
connection_t **carray;
|
connection_t **carray;
|
||||||
|
|
||||||
|
get_connection_array(&carray,&n);
|
||||||
for(i=0;i<n;i++) {
|
for(i=0;i<n;i++) {
|
||||||
conn = carray[i];
|
conn = carray[i];
|
||||||
if(conn->type == type && conn->state == state && !conn->marked_for_close)
|
if(conn->type == type && conn->state == state && !conn->marked_for_close)
|
||||||
@ -594,6 +595,7 @@ connection_t *connection_get_by_type_state_lastwritten(int type, int state) {
|
|||||||
connection_t *conn, *best=NULL;
|
connection_t *conn, *best=NULL;
|
||||||
connection_t **carray;
|
connection_t **carray;
|
||||||
|
|
||||||
|
get_connection_array(&carray,&n);
|
||||||
for(i=0;i<n;i++) {
|
for(i=0;i<n;i++) {
|
||||||
conn = carray[i];
|
conn = carray[i];
|
||||||
if(conn->type == type && conn->state == state && !conn->marked_for_close)
|
if(conn->type == type && conn->state == state && !conn->marked_for_close)
|
||||||
|
Loading…
Reference in New Issue
Block a user