소스 검색

We need to call get_connection_array before using its outputs

svn:r513
Nick Mathewson 22 년 전
부모
커밋
d0273ee135
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      src/or/connection.c

+ 2 - 0
src/or/connection.c

@@ -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)