• Home
  • Raw
  • Download

Lines Matching refs:conn_state

197 static ConnState *conn_state;  variable
693 assert(conn_state[conn_no].in_use); in handle_transaction()
697 Int sd = conn_state[conn_no].conn_sd; in handle_transaction()
740 if (conn_state[conn_no].file_fd == 0) { in handle_transaction()
745 conn_state[conn_no].file_fd, in handle_transaction()
746 conn_state[conn_no].file_size); in handle_transaction()
758 if (conn_state[conn_no].file_fd != 0) { in handle_transaction()
768 conn_count, conn_state[conn_no].session_id, filename ); in handle_transaction()
786 conn_state[conn_no].file_fd = fd; in handle_transaction()
787 conn_state[conn_no].file_size = stat_buf.st_size; in handle_transaction()
789 res = mk_Frame_le64_le64("OPOK", conn_state[conn_no].session_id, in handle_transaction()
790 conn_state[conn_no].file_size); in handle_transaction()
792 conn_count, conn_state[conn_no].session_id, filename ); in handle_transaction()
805 if (req_session_id != conn_state[conn_no].session_id) { in handle_transaction()
811 if (ok && conn_state[conn_no].file_fd == 0) { in handle_transaction()
819 if (ok && req_len + req_offset > conn_state[conn_no].file_size) { in handle_transaction()
828 size_t nRead = pread(conn_state[conn_no].file_fd, in handle_transaction()
863 conn_state[conn_no].stats_n_rdok_frames++; in handle_transaction()
864 conn_state[conn_no].stats_n_read_unz_bytes += req_len; in handle_transaction()
865 conn_state[conn_no].stats_n_read_z_bytes += zLen; in handle_transaction()
915 if (conn_state[conn_no].conn_sd > 0) in handle_transaction()
916 close(conn_state[conn_no].conn_sd); in handle_transaction()
917 if (conn_state[conn_no].file_fd > 0) in handle_transaction()
918 close(conn_state[conn_no].file_fd); in handle_transaction()
920 if (conn_state[conn_no].stats_n_rdok_frames > 0) { in handle_transaction()
923 conn_count, conn_state[conn_no].session_id, in handle_transaction()
924 conn_state[conn_no].stats_n_rdok_frames, in handle_transaction()
925 conn_state[conn_no].stats_n_read_unz_bytes / 1000000, in handle_transaction()
926 conn_state[conn_no].stats_n_read_z_bytes / 1000000, in handle_transaction()
927 (double)conn_state[conn_no].stats_n_read_unz_bytes in handle_transaction()
928 / (double)conn_state[conn_no].stats_n_read_z_bytes); in handle_transaction()
930 conn_count, conn_state[conn_no].session_id); in handle_transaction()
935 memset(&conn_state[conn_no], 0, sizeof(conn_state[conn_no])); in handle_transaction()
1098 conn_state = my_malloc(M_CONNECTIONS * sizeof conn_state[0]); in main()
1104 memset(conn_state, 0, M_CONNECTIONS * sizeof conn_state[0]); in main()
1171 if (!conn_state[i].in_use) in main()
1186 memset(&conn_state[i], 0, sizeof(conn_state[i])); in main()
1187 conn_state[i].in_use = True; in main()
1188 conn_state[i].conn_sd = new_sd; in main()
1189 conn_state[i].file_fd = 0; /* not known yet */ in main()
1190 conn_state[i].session_id = next_session_id++; in main()
1213 if (!conn_state[i].in_use) in main()
1215 assert(conn_state[i].conn_sd > 2); in main()
1216 tmp_pollfd[j].fd = conn_state[i].conn_sd; in main()
1255 if (conn_state[i].stats_n_rdok_frames > 0 in main()
1256 && (conn_state[i].stats_n_rdok_frames % 1000) == 0) { in main()
1259 conn_count, conn_state[conn_no].session_id, in main()
1260 conn_state[conn_no].stats_n_rdok_frames, in main()
1261 conn_state[conn_no].stats_n_read_unz_bytes / 1000000, in main()
1262 conn_state[conn_no].stats_n_read_z_bytes / 1000000); in main()