зеркало из https://github.com/mozilla/gecko-dev.git
1) NT need the err= defines, use macros to set it appropriately (or not).
2) restore missing sec = function
This commit is contained in:
Родитель
af5d446d62
Коммит
fe2e2268dc
|
@ -32,7 +32,7 @@
|
|||
* may use your version of this file under either the MPL or the
|
||||
* GPL.
|
||||
*
|
||||
* $Id: sslcon.c,v 1.17 2001/12/07 01:36:23 relyea%netscape.com Exp $
|
||||
* $Id: sslcon.c,v 1.18 2001/12/07 02:30:52 relyea%netscape.com Exp $
|
||||
*/
|
||||
|
||||
#include "nssrenam.h"
|
||||
|
@ -1508,6 +1508,7 @@ ssl2_CreateSessionCypher(sslSocket *ss, sslSessionID *sid, PRBool isClient)
|
|||
goto sec_loser;
|
||||
}
|
||||
|
||||
sec = ss->sec;
|
||||
ci = &sec->ci;
|
||||
rk = isClient ? &readKey : &writeKey;
|
||||
wk = isClient ? &writeKey : &readKey;
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
* may use your version of this file under either the MPL or the
|
||||
* GPL.
|
||||
*
|
||||
* $Id: ssldef.c,v 1.6 2001/12/07 01:36:23 relyea%netscape.com Exp $
|
||||
* $Id: ssldef.c,v 1.7 2001/12/07 02:30:53 relyea%netscape.com Exp $
|
||||
*/
|
||||
|
||||
#include "cert.h"
|
||||
|
@ -41,8 +41,10 @@
|
|||
|
||||
#if defined(WIN32)
|
||||
#define MAP_ERROR(from,to) if (err == from) { PORT_SetError(to); }
|
||||
#define DEFINE_ERROR PRErrorCode err = PR_GetError();
|
||||
#else
|
||||
#define MAP_ERROR(from,to)
|
||||
#define DEFINE_ERROR
|
||||
#endif
|
||||
|
||||
int ssl_DefConnect(sslSocket *ss, const PRNetAddr *sa)
|
||||
|
@ -88,7 +90,7 @@ int ssl_DefRecv(sslSocket *ss, unsigned char *buf, int len, int flags)
|
|||
|
||||
rv = lower->methods->recv(lower, (void *)buf, len, flags, ss->rTimeout);
|
||||
if (rv < 0) {
|
||||
/* PRErrorCode err = PR_GetError(); */
|
||||
DEFINE_ERROR
|
||||
MAP_ERROR(PR_SOCKET_SHUTDOWN_ERROR, PR_CONNECT_RESET_ERROR)
|
||||
} else if (rv > len) {
|
||||
PORT_Assert(rv <= len);
|
||||
|
@ -152,7 +154,7 @@ int ssl_DefRead(sslSocket *ss, unsigned char *buf, int len)
|
|||
|
||||
rv = lower->methods->read(lower, (void *)buf, len);
|
||||
if (rv < 0) {
|
||||
/* PRErrorCode err = PR_GetError(); */
|
||||
DEFINE_ERROR
|
||||
MAP_ERROR(PR_SOCKET_SHUTDOWN_ERROR, PR_CONNECT_RESET_ERROR)
|
||||
}
|
||||
return rv;
|
||||
|
|
Загрузка…
Ссылка в новой задаче