From: John Hodge Date: Fri, 8 Feb 2013 10:51:16 +0000 (+0800) Subject: Tools/NetTest - Seed RNG, tcpclient logging X-Git-Tag: rel0.15~587 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=13f90308151421ad0cff55478c12dbee8fd1b837;p=tpg%2Facess2.git Tools/NetTest - Seed RNG, tcpclient logging --- diff --git a/Tools/NetTest/main.c b/Tools/NetTest/main.c index d3728c5f..95e70ab0 100644 --- a/Tools/NetTest/main.c +++ b/Tools/NetTest/main.c @@ -10,6 +10,7 @@ #include #include #include +#include extern int VFS_Init(void); extern int IPStack_Install(char **Args); @@ -38,7 +39,9 @@ int main(int argc, char *argv[]) PrintUsage(argv[0]); return 1; } - + + srand(time(NULL)); + // Startup VFS_Init(); { diff --git a/Tools/NetTest/tcpclient.c b/Tools/NetTest/tcpclient.c index 3ad9f6da..8657a1d3 100644 --- a/Tools/NetTest/tcpclient.c +++ b/Tools/NetTest/tcpclient.c @@ -21,6 +21,7 @@ void NetTest_Suite_Netcat(const char *Address, int Port) Log_Error("Netcat", "herpaderp tcpc"); return ; } + Log_Notice("Netcat", "Connection open"); char buffer[1024]; size_t len; @@ -28,6 +29,8 @@ void NetTest_Suite_Netcat(const char *Address, int Port) { NetTest_WriteStdout(buffer, len); } + + Log_Notice("Netcat", "Closing connection"); VFS_Close(fd); }