Created
May 1, 2013 19:04
-
-
Save jimblandy/5497530 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Make nsServerSocket::InitWithAddress provide more detailed error results. | |
try: -b do -n -p all -u all -t none | |
https://tbpl.mozilla.org/?tree=Try&rev=901415367701 | |
diff --git a/netwerk/base/src/nsServerSocket.cpp b/netwerk/base/src/nsServerSocket.cpp | |
--- a/netwerk/base/src/nsServerSocket.cpp | |
+++ b/netwerk/base/src/nsServerSocket.cpp | |
@@ -289,7 +289,7 @@ nsServerSocket::InitWithAddress(const PR | |
if (!mFD) | |
{ | |
NS_WARNING("unable to create server socket"); | |
- return NS_ERROR_FAILURE; | |
+ return NS_ErrorAccordingToNSPR(); | |
} | |
PRSocketOptionData opt; | |
@@ -330,8 +330,9 @@ nsServerSocket::InitWithAddress(const PR | |
return NS_OK; | |
fail: | |
+ nsresult rv = NS_ErrorAccordingToNSPR(); | |
Close(); | |
- return NS_ERROR_FAILURE; | |
+ return rv; | |
} | |
NS_IMETHODIMP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment