Skip to content

Commit

Permalink
Merge pull request #12 from WFA-DakeZhao/master
Browse files Browse the repository at this point in the history
Sync up Wi-Fi Test Suite 9.2.0 Windows DUT codes
  • Loading branch information
WFA-DakeZhao authored Oct 5, 2016
2 parents 61ecad0 + 864e7a2 commit 39b2236
Show file tree
Hide file tree
Showing 25 changed files with 1,964 additions and 953 deletions.
4 changes: 2 additions & 2 deletions win_ca/win_ca.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Global
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A0D02A3A-4CD6-48EB-835D-E8612F4F53C1}.Debug|Win32.ActiveCfg = Debug|Win32
{A0D02A3A-4CD6-48EB-835D-E8612F4F53C1}.Debug|Win32.Build.0 = Debug|Win32
{A0D02A3A-4CD6-48EB-835D-E8612F4F53C1}.Debug|Win32.ActiveCfg = Release|Win32
{A0D02A3A-4CD6-48EB-835D-E8612F4F53C1}.Debug|Win32.Build.0 = Release|Win32
{A0D02A3A-4CD6-48EB-835D-E8612F4F53C1}.Release|Win32.ActiveCfg = Release|Win32
{A0D02A3A-4CD6-48EB-835D-E8612F4F53C1}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
Expand Down
16 changes: 11 additions & 5 deletions win_ca/win_ca/wfa_ca.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ extern dutCommandRespFuncPtr wfaCmdRespProcFuncTbl[];
extern typeNameStr_t nameStr[];

/*
* the output format can be redefined for file output.
* The output format can be redefined for file output.
*/
int main(int argc, char *argv[])
{
Expand Down Expand Up @@ -61,14 +61,19 @@ int main(int argc, char *argv[])
int iOptVal = 0;
int iOptLen = sizeof (int);

WFA_OUT = stdout;
WFA_ERR = stderr;
WFA_WNG = stdout;

DPRINT_INFOL(WFA_OUT, "%c[%d;%d;%dm", 0x1B, 1,32,40);
if(argc < 3)
{
DPRINT_ERR(WFA_ERR, "Usage: %s <control interface> <local control agent port> [<DUT IP> <DUT PORT> [<Logfile Path>]]\n", argv[0]);
exit(1);
}

myport = atoi(argv[2]);
myport = atoi(argv[2]);

if(argc > 3)
{
if(argc < 5)
Expand All @@ -95,10 +100,11 @@ int main(int argc, char *argv[])
logfile = fopen(argv[5],"a");
if(logfile != NULL)
{
fd = _fileno(logfile);
WFA_OUT = WFA_ERR = WFA_WNG = logfile;
//fd = _fileno(logfile);
DPRINT_INFO(WFA_OUT,"redirecting the output to %s\n",argv[5]);
_dup2(fd,1);
_dup2(fd,2);
//_dup2(fd,1);
//_dup2(fd,2);
}
else
{
Expand Down
Loading

0 comments on commit 39b2236

Please sign in to comment.