Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(493)

Unified Diff: net/third_party/nss/ssl/sslmutex.c

Issue 9558017: Update net/third_party/nss to NSS 3.13.3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Upload before checkin Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/third_party/nss/ssl/sslmutex.h ('k') | net/third_party/nss/ssl/sslnonce.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/third_party/nss/ssl/sslmutex.c
===================================================================
--- net/third_party/nss/ssl/sslmutex.c (revision 124804)
+++ net/third_party/nss/ssl/sslmutex.c (working copy)
@@ -33,7 +33,7 @@
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
-/* $Id: sslmutex.c,v 1.25 2010/04/03 18:27:33 nelson%bolyard.com Exp $ */
+/* $Id: sslmutex.c,v 1.27 2011/10/01 00:11:02 wtc%google.com Exp $ */
#include "seccomon.h"
/* This ifdef should match the one in sslsnce.c */
@@ -168,7 +168,7 @@
}
SECStatus
-sslMutex_Destroy(sslMutex *pMutex)
+sslMutex_Destroy(sslMutex *pMutex, PRBool processLocal)
{
if (PR_FALSE == pMutex->isMultiProcess) {
return single_process_sslMutex_Destroy(pMutex);
@@ -180,6 +180,10 @@
close(pMutex->u.pipeStr.mPipes[0]);
close(pMutex->u.pipeStr.mPipes[1]);
+ if (processLocal) {
+ return SECSuccess;
+ }
+
pMutex->u.pipeStr.mPipes[0] = -1;
pMutex->u.pipeStr.mPipes[1] = -1;
pMutex->u.pipeStr.mPipes[2] = -1;
@@ -409,7 +413,7 @@
}
SECStatus
-sslMutex_Destroy(sslMutex *pMutex)
+sslMutex_Destroy(sslMutex *pMutex, PRBool processLocal)
{
HANDLE hMutex;
int rv;
@@ -435,9 +439,10 @@
}
rv = CloseHandle(hMutex); /* ignore error */
- if (rv) {
+ if (!processLocal && rv) {
pMutex->u.sslMutx = hMutex = INVALID_HANDLE_VALUE;
- } else {
+ }
+ if (!rv) {
nss_MD_win32_map_default_error(GetLastError());
retvalue = SECFailure;
}
@@ -557,12 +562,17 @@
}
SECStatus
-sslMutex_Destroy(sslMutex *pMutex)
+sslMutex_Destroy(sslMutex *pMutex, PRBool processLocal)
{
int rv;
if (PR_FALSE == pMutex->isMultiProcess) {
return single_process_sslMutex_Destroy(pMutex);
}
+
+ /* semaphores are global resources. See SEM_DESTROY(3) man page */
+ if (processLocal) {
+ return SECSuccess;
+ }
do {
rv = sem_destroy(&pMutex->u.sem);
} while (rv < 0 && errno == EINTR);
@@ -623,7 +633,7 @@
}
SECStatus
-sslMutex_Destroy(sslMutex *pMutex)
+sslMutex_Destroy(sslMutex *pMutex, PRBool processLocal)
{
PR_ASSERT(pMutex);
if (PR_FALSE == pMutex->isMultiProcess) {
« no previous file with comments | « net/third_party/nss/ssl/sslmutex.h ('k') | net/third_party/nss/ssl/sslnonce.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698