Commit 8fba1df2 authored by Robert Ricci's avatar Robert Ricci

Fix a bug of mine - need to do the init() before setting up standalone

mode, or the db entry gets marked as invalid.
parent d93553ac
......@@ -26,7 +26,7 @@
#include <netinet/tcp.h>
#define STDIN 0 // file descriptor for standard input
#define QUANTA 5000 //feed-loop interval in msec
#define QUANTA 500 //feed-loop interval in msec
#define MONITOR_PORT 4200 //the port the monitor connects to
#define SENDER_PORT 3491 //the port the stub senders connect to
#define PENDING_CONNECTIONS 10 //the pending connections the queue will hold
......
......@@ -595,6 +595,7 @@ int main(int argc, char *argv[]) {
char ch;
gettimeofday(&packet_deadline, NULL);
init();
//set up debug flag
if (getenv("Debug")!=NULL)
......@@ -633,6 +634,7 @@ int main(int argc, char *argv[]) {
rcvdb[0].sockfd= -1; //show error if used
rcvdb[0].last_usetime = time(NULL);
}
printf("Running in standalone mode\n");
} else {
if (argc != 1) {
fprintf(stderr,"Wrong number of options: %i\n",argc);
......@@ -697,7 +699,6 @@ int main(int argc, char *argv[]) {
//initialization
packet_buffer_init();
init_random_buffer();
init();
init_pcap(SNIFF_TIMEOUT);
FD_ZERO(&read_fds);
FD_ZERO(&read_fds_copy);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment