diff options
author | lpleahy <lpleahy@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-08-31 01:16:38 +0000 |
---|---|---|
committer | lpleahy <lpleahy@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-08-31 01:16:38 +0000 |
commit | 0983d20400627e01d53d59cd3ac4678751997a57 (patch) | |
tree | 8c2ddad4108dd87028a066edb7e7a7fb32976f92 | |
parent | af0b26a047a3524bf891cc3408fe3f64d0998bc6 (diff) | |
download | edk2-0983d20400627e01d53d59cd3ac4678751997a57.zip edk2-0983d20400627e01d53d59cd3ac4678751997a57.tar.gz edk2-0983d20400627e01d53d59cd3ac4678751997a57.tar.bz2 |
Use sockets by default
Signed-off by: Lee Leahy
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/branches/EADK@12241 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | AppPkg/Applications/Sockets/DataSource/DataSource.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/AppPkg/Applications/Sockets/DataSource/DataSource.c b/AppPkg/Applications/Sockets/DataSource/DataSource.c index 15867f0..98a0c9f 100644 --- a/AppPkg/Applications/Sockets/DataSource/DataSource.c +++ b/AppPkg/Applications/Sockets/DataSource/DataSource.c @@ -1497,12 +1497,15 @@ main ( //
// Validate the command line
//
- if ( 2 != Argc ) {
- Print ( L"%s <remote IP address>\r\n", Argv[0] );
+ if ( 2 > Argc ) {
+ Print ( L"%s <remote IP address> [Use TCP]\r\n", Argv[0] );
return -1;
}
-bTcp4 = TRUE;
+ //
+ // Determine if TCP should be used
+ //
+ bTcp4 = (BOOLEAN)( 2 < Argc );
//
// Determine the support routines
@@ -1537,10 +1540,6 @@ bTcp4 = TRUE; RemoteHostAddress.sin_family = AF_INET;
RemoteHostAddress.sin_port = htons ( PcdGet16 ( DataSource_Port ));
-Print ( L"Argc: %d\r\n", Argc);
-Print ( L"Argv[0]: %a\r\n", Argv[0]);
-Print ( L"Argv[1]: %a\r\n", Argv[1]);
-
//
// Get the IP address
//
|