Open mmirabent opened 8 years ago
syn_table_size and ack_table_size should be a static integer defined in session.c, and not in session.h to keep it from getting messed with.
Beware. In pull request #17 in order to squelch a warning, I made the syn_table
and syn_table_idx
variables extern
variables and added declarations to the main.c file. This means they are declared external in the header file and declared for real in ONE AND ONLY ONE translation unit (i.e. .c source file). What this means is that when the syn_table initialization code is moved into session.c, the declaration needs to happen in session.c and not in main. Also, the extern declaration should be removed from the header file entirely, and the variables should be declared statically in session.c, like the ack_table
and ack_table_idx
variables are.
Make init_ack and init_syn functions in session.c
Also make the init functions take an integer argument to set the table size.