summaryrefslogtreecommitdiff
path: root/edk2/StdLib/EfiSocketLib/UseEfiSocketLib.c
diff options
context:
space:
mode:
authorlpleahy <lpleahy@6f19259b-4bc3-4df7-8a09-765794883524>2012-06-01 20:01:30 +0000
committerlpleahy <lpleahy@6f19259b-4bc3-4df7-8a09-765794883524>2012-06-01 20:01:30 +0000
commit003ac7f34fab43d44cd92c3db908bb67bd905d80 (patch)
tree58e1e0f2792c03e587b828d0c5e754153d0926d0 /edk2/StdLib/EfiSocketLib/UseEfiSocketLib.c
parent4e837070473c496ef5708116df3b6858a716f6f1 (diff)
UseEfiSocketLib.c - Only exit for out of resources, otherwise use all network adapters.
Service.c - Return EFI_SUCCESS if any of the protocols are present. Return failure only when no protocols are available or no more memory available. Signed-off-by: lpleahy Reviewed-by: vzimmer git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk@13426 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'edk2/StdLib/EfiSocketLib/UseEfiSocketLib.c')
-rw-r--r--edk2/StdLib/EfiSocketLib/UseEfiSocketLib.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/edk2/StdLib/EfiSocketLib/UseEfiSocketLib.c b/edk2/StdLib/EfiSocketLib/UseEfiSocketLib.c
index ed72e8e76..6f4248b3d 100644
--- a/edk2/StdLib/EfiSocketLib/UseEfiSocketLib.c
+++ b/edk2/StdLib/EfiSocketLib/UseEfiSocketLib.c
@@ -196,10 +196,17 @@ EslServiceNetworkConnect (
for ( Index = 0; HandleCount > Index; Index++ ) {
Status = EslServiceConnect ( gImageHandle,
pHandles[ Index ]);
- if ( EFI_ERROR ( Status )) {
- break;
+ if ( !EFI_ERROR ( Status )) {
+ bSomethingFound = TRUE;
+ }
+ else {
+ if ( EFI_OUT_OF_RESOURCES == Status ) {
+ //
+ // Pointless to continue without memory
+ //
+ break;
+ }
}
- bSomethingFound = TRUE;
}
//