]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
We need to call get_connection_array before using its outputs
authorNick Mathewson <nickm@torproject.org>
Tue, 30 Sep 2003 19:25:16 +0000 (19:25 +0000)
committerNick Mathewson <nickm@torproject.org>
Tue, 30 Sep 2003 19:25:16 +0000 (19:25 +0000)
svn:r513

src/or/connection.c

index 61b6cb0c8ae03e12ff6dde230fe8cea68219c0b4..a0fea8c705dcc3d8dee1f1e51e13240a627799d5 100644 (file)
@@ -581,6 +581,7 @@ connection_t *connection_get_by_type_state(int type, int state) {
   connection_t *conn;
   connection_t **carray;
  
+  get_connection_array(&carray,&n);
   for(i=0;i<n;i++) {
     conn = carray[i];
     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 **carray;
  
+  get_connection_array(&carray,&n);
   for(i=0;i<n;i++) {
     conn = carray[i];
     if(conn->type == type && conn->state == state && !conn->marked_for_close)