mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-08 16:03:21 +00:00
Eliminate SOCKET_ERRNO and xp_sock.h
This commit is contained in:
parent
f0fd92110e
commit
0286a3fe89
@ -86,8 +86,6 @@
|
||||
|
||||
#endif /* XP_UNIX */
|
||||
|
||||
#include "xp_error.h"
|
||||
|
||||
/* for XP_GetString() */
|
||||
#include "xpgetstr.h"
|
||||
extern int MK_CONNECTION_REFUSED;
|
||||
|
@ -98,7 +98,6 @@
|
||||
#endif /* NSPR20 */
|
||||
|
||||
#include "sslerr.h"
|
||||
#include "xp_error.h"
|
||||
#include "merrors.h"
|
||||
#include "prefetch.h"
|
||||
|
||||
@ -3231,7 +3230,7 @@ PUBLIC int NET_ProcessNet (PRFileDesc *ready_fd, int fd_type)
|
||||
}
|
||||
else if(tmpEntry->status < 0
|
||||
&& !tmpEntry->URL_s->use_local_copy
|
||||
&& XP_GetError() != SSL_ERROR_BAD_CERTIFICATE
|
||||
&& PR_GetError() != SSL_ERROR_BAD_CERTIFICATE
|
||||
&& (tmpEntry->status == MK_CONNECTION_REFUSED
|
||||
|| tmpEntry->status == MK_CONNECTION_TIMED_OUT
|
||||
|| tmpEntry->status == MK_UNABLE_TO_CREATE_SOCKET
|
||||
@ -3319,7 +3318,7 @@ PUBLIC int NET_ProcessNet (PRFileDesc *ready_fd, int fd_type)
|
||||
* window may be active, but it should get
|
||||
* the same error
|
||||
*/
|
||||
if(SOCKET_ERRNO == XP_ERRNO_ENETDOWN)
|
||||
if(PR_GetOSError() == XP_ERRNO_ENETDOWN)
|
||||
{
|
||||
NET_SilentInterruptWindow(tmpEntry->window_id);
|
||||
}
|
||||
|
@ -25,8 +25,6 @@
|
||||
#include "merrors.h"
|
||||
#include "ssl.h"
|
||||
|
||||
#include "xp_error.h"
|
||||
|
||||
extern int MK_HTTP_TYPE_CONFLICT;
|
||||
extern int XP_ERRNO_EWOULDBLOCK;
|
||||
|
||||
|
@ -18,8 +18,6 @@
|
||||
#ifndef MKTCP_H
|
||||
#define MKTCP_H
|
||||
|
||||
#include "xp_sock.h"
|
||||
|
||||
PR_BEGIN_EXTERN_C
|
||||
|
||||
/* state machine data for host connect */
|
||||
|
@ -45,7 +45,6 @@
|
||||
#include "mktcp.h"
|
||||
#include "netutils.h"
|
||||
|
||||
#include "xp_error.h"
|
||||
#include "xpgetstr.h"
|
||||
|
||||
#include "mimeenc.h"
|
||||
|
@ -50,7 +50,6 @@ IL_Type(const char *buf, int32 len);
|
||||
#include "errno.h"
|
||||
#endif
|
||||
|
||||
#include "xp_error.h"
|
||||
#include "prefapi.h"
|
||||
|
||||
/* for XP_GetString() */
|
||||
|
@ -65,7 +65,6 @@
|
||||
#endif
|
||||
#endif /* XP_UNIX */
|
||||
|
||||
#include "xp_error.h"
|
||||
#include "prefapi.h"
|
||||
|
||||
/* for XP_GetString() */
|
||||
@ -2617,7 +2616,8 @@ net_ftp_push_partial_cache_file(ActiveEntry * ce)
|
||||
|
||||
if( status < 0 )
|
||||
{
|
||||
ce->URL_s->error_msg = NET_ExplainErrorDetails(MK_TCP_READ_ERROR, SOCKET_ERRNO);
|
||||
ce->URL_s->error_msg = NET_ExplainErrorDetails(MK_TCP_READ_ERROR,
|
||||
PR_GetOSError());
|
||||
return MK_TCP_READ_ERROR;
|
||||
}
|
||||
else if( status == 0 )
|
||||
|
@ -58,10 +58,6 @@
|
||||
#include "mkparse.h" /* NET_ParseURL() */
|
||||
#include "remoturl.h" /* NET_RemoteHostLoad */
|
||||
|
||||
|
||||
#include "xp_error.h"
|
||||
|
||||
|
||||
/* for XP_GetString() */
|
||||
#include "xpgetstr.h"
|
||||
extern int XP_HTML_GOPHER_INDEX;
|
||||
@ -199,7 +195,7 @@ net_parse_menu (ActiveEntry * cur_entry)
|
||||
}
|
||||
else if(CE_STATUS < 0)
|
||||
{
|
||||
NET_ExplainErrorDetails(MK_TCP_READ_ERROR, SOCKET_ERRNO);
|
||||
NET_ExplainErrorDetails(MK_TCP_READ_ERROR, PR_GetOSError());
|
||||
|
||||
/* return TCP error
|
||||
*/
|
||||
@ -462,7 +458,7 @@ net_parse_cso (ActiveEntry * cur_entry)
|
||||
*/
|
||||
if(CE_STATUS < 0)
|
||||
{
|
||||
NET_ExplainErrorDetails(MK_TCP_READ_ERROR, SOCKET_ERRNO);
|
||||
NET_ExplainErrorDetails(MK_TCP_READ_ERROR, PR_GetOSError());
|
||||
|
||||
/* return TCP error
|
||||
*/
|
||||
|
@ -46,7 +46,6 @@
|
||||
#include "ssl.h"
|
||||
#include "jscookie.h"
|
||||
#include "prefapi.h"
|
||||
#include "xp_error.h"
|
||||
#include "libi18n.h"
|
||||
#include "prtime.h"
|
||||
#include "prmem.h"
|
||||
@ -496,7 +495,7 @@ net_start_http_connect(ActiveEntry * ce)
|
||||
}
|
||||
|
||||
TRACEMSG(("HTTP: Unable to connect to host for `%s' (errno = %d).",
|
||||
CE_URL_S->address, SOCKET_ERRNO));
|
||||
CE_URL_S->address, PR_GetOSError()));
|
||||
/*
|
||||
* Proxy failover
|
||||
*/
|
||||
@ -619,7 +618,7 @@ net_finish_http_connect(ActiveEntry * ce)
|
||||
|
||||
NET_ClearConnectSelect(CE_WINDOW_ID, CE_CON_SOCK);
|
||||
TRACEMSG(("HTTP: Unable to connect to host for `%s' (errno = %d).",
|
||||
CE_URL_S->address, SOCKET_ERRNO));
|
||||
CE_URL_S->address, PR_GetOSError()));
|
||||
|
||||
/*
|
||||
* Proxy failover
|
||||
@ -1752,7 +1751,7 @@ net_parse_http_mime_headers (ActiveEntry *ce)
|
||||
|
||||
if(CE_STATUS < 0)
|
||||
{
|
||||
NET_ExplainErrorDetails(MK_TCP_READ_ERROR, SOCKET_ERRNO);
|
||||
NET_ExplainErrorDetails(MK_TCP_READ_ERROR, PR_GetOSError());
|
||||
|
||||
/* return TCP error
|
||||
*/
|
||||
@ -2964,7 +2963,7 @@ net_http_push_partial_cache_file(ActiveEntry *ce)
|
||||
/* @@@ This is the wrong error code
|
||||
*/
|
||||
ce->URL_s->error_msg = NET_ExplainErrorDetails(MK_TCP_READ_ERROR,
|
||||
SOCKET_ERRNO);
|
||||
PR_GetOSError());
|
||||
return(MK_TCP_READ_ERROR);
|
||||
}
|
||||
else if(status == 0)
|
||||
|
@ -58,7 +58,6 @@
|
||||
#include "prtime.h"
|
||||
#include "prlog.h"
|
||||
|
||||
#include "xp_error.h"
|
||||
#include "secnav.h"
|
||||
#include "prefapi.h"
|
||||
|
||||
@ -672,7 +671,7 @@ net_news_response (ActiveEntry * ce)
|
||||
if(ce->status < 0)
|
||||
{
|
||||
ce->URL_s->error_msg = NET_ExplainErrorDetails(MK_TCP_READ_ERROR,
|
||||
SOCKET_ERRNO);
|
||||
PR_GetOSError());
|
||||
|
||||
/* return TCP error
|
||||
*/
|
||||
@ -869,7 +868,7 @@ PRIVATE int net_nntp_send_list_extensions_response (ActiveEntry *ce)
|
||||
return ce->status; /* no line yet */
|
||||
if (ce->status < 0)
|
||||
{
|
||||
ce->URL_s->error_msg = NET_ExplainErrorDetails(MK_TCP_READ_ERROR, SOCKET_ERRNO);
|
||||
ce->URL_s->error_msg = NET_ExplainErrorDetails(MK_TCP_READ_ERROR, PR_GetOSError());
|
||||
/* return TCP error */
|
||||
return MK_TCP_READ_ERROR;
|
||||
}
|
||||
@ -942,7 +941,7 @@ PRIVATE int net_nntp_send_list_searches_response (ActiveEntry *ce)
|
||||
return ce->status; /* no line yet */
|
||||
if (ce->status < 0)
|
||||
{
|
||||
ce->URL_s->error_msg = NET_ExplainErrorDetails(MK_TCP_READ_ERROR, SOCKET_ERRNO);
|
||||
ce->URL_s->error_msg = NET_ExplainErrorDetails(MK_TCP_READ_ERROR, PR_GetOSError());
|
||||
/* return TCP error */
|
||||
return MK_TCP_READ_ERROR;
|
||||
}
|
||||
@ -997,7 +996,7 @@ PRIVATE int net_send_list_search_headers_response (ActiveEntry *ce)
|
||||
return ce->status; /* no line yet */
|
||||
if (ce->status < 0)
|
||||
{
|
||||
ce->URL_s->error_msg = NET_ExplainErrorDetails(MK_TCP_READ_ERROR, SOCKET_ERRNO);
|
||||
ce->URL_s->error_msg = NET_ExplainErrorDetails(MK_TCP_READ_ERROR, PR_GetOSError());
|
||||
/* return TCP error */
|
||||
return MK_TCP_READ_ERROR;
|
||||
}
|
||||
@ -1055,7 +1054,7 @@ PRIVATE int nntp_get_properties_response (ActiveEntry *ce)
|
||||
return ce->status; /* no line yet */
|
||||
if (ce->status < 0)
|
||||
{
|
||||
ce->URL_s->error_msg = NET_ExplainErrorDetails(MK_TCP_READ_ERROR, SOCKET_ERRNO);
|
||||
ce->URL_s->error_msg = NET_ExplainErrorDetails(MK_TCP_READ_ERROR, PR_GetOSError());
|
||||
/* return TCP error */
|
||||
return MK_TCP_READ_ERROR;
|
||||
}
|
||||
@ -1133,7 +1132,7 @@ PRIVATE int net_send_list_subscriptions_response (ActiveEntry *ce)
|
||||
return ce->status; /* no line yet */
|
||||
if (ce->status < 0)
|
||||
{
|
||||
ce->URL_s->error_msg = NET_ExplainErrorDetails(MK_TCP_READ_ERROR, SOCKET_ERRNO);
|
||||
ce->URL_s->error_msg = NET_ExplainErrorDetails(MK_TCP_READ_ERROR, PR_GetOSError());
|
||||
/* return TCP error */
|
||||
return MK_TCP_READ_ERROR;
|
||||
}
|
||||
@ -2103,7 +2102,7 @@ net_process_newgroups (ActiveEntry *ce)
|
||||
|
||||
if(ce->status<0)
|
||||
{
|
||||
ce->URL_s->error_msg = NET_ExplainErrorDetails(MK_TCP_READ_ERROR, SOCKET_ERRNO);
|
||||
ce->URL_s->error_msg = NET_ExplainErrorDetails(MK_TCP_READ_ERROR, PR_GetOSError());
|
||||
|
||||
/* return TCP error
|
||||
*/
|
||||
@ -2235,7 +2234,7 @@ net_read_news_list (ActiveEntry *ce)
|
||||
|
||||
if(ce->status<0)
|
||||
{
|
||||
ce->URL_s->error_msg = NET_ExplainErrorDetails(MK_TCP_READ_ERROR, SOCKET_ERRNO);
|
||||
ce->URL_s->error_msg = NET_ExplainErrorDetails(MK_TCP_READ_ERROR, PR_GetOSError());
|
||||
|
||||
/* return TCP error
|
||||
*/
|
||||
@ -2511,7 +2510,7 @@ net_read_xover (ActiveEntry *ce)
|
||||
if(ce->status<0)
|
||||
{
|
||||
ce->URL_s->error_msg = NET_ExplainErrorDetails(MK_TCP_READ_ERROR,
|
||||
SOCKET_ERRNO);
|
||||
PR_GetOSError());
|
||||
|
||||
/* return TCP error
|
||||
*/
|
||||
@ -2741,7 +2740,7 @@ net_read_news_group_body (ActiveEntry *ce)
|
||||
|
||||
if(ce->status < 0)
|
||||
{
|
||||
ce->URL_s->error_msg = NET_ExplainErrorDetails(MK_TCP_READ_ERROR, SOCKET_ERRNO);
|
||||
ce->URL_s->error_msg = NET_ExplainErrorDetails(MK_TCP_READ_ERROR, PR_GetOSError());
|
||||
|
||||
/* return TCP error
|
||||
*/
|
||||
@ -3677,7 +3676,8 @@ PRIVATE int net_nntp_search_results (ActiveEntry *ce)
|
||||
return ce->status; /* no line yet */
|
||||
if (ce->status < 0)
|
||||
{
|
||||
ce->URL_s->error_msg = NET_ExplainErrorDetails(MK_TCP_READ_ERROR, SOCKET_ERRNO);
|
||||
ce->URL_s->error_msg = NET_ExplainErrorDetails(MK_TCP_READ_ERROR,
|
||||
PR_GetOSError());
|
||||
/* return TCP error */
|
||||
return MK_TCP_READ_ERROR;
|
||||
}
|
||||
|
@ -54,7 +54,6 @@ and change the POP3_QUIT_RESPONSE state to flush the newly committed deletes. */
|
||||
#include "secnav.h"
|
||||
#include "ssl.h"
|
||||
|
||||
#include "xp_error.h"
|
||||
#include "xpgetstr.h"
|
||||
|
||||
#include "prefapi.h"
|
||||
@ -748,7 +747,7 @@ net_pop3_send_command(ActiveEntry *ce, const char * command)
|
||||
|
||||
if(status < 0)
|
||||
{
|
||||
ce->URL_s->error_msg = NET_ExplainErrorDetails(MK_TCP_WRITE_ERROR, SOCKET_ERRNO);
|
||||
ce->URL_s->error_msg = NET_ExplainErrorDetails(MK_TCP_WRITE_ERROR, PR_GetOSError());
|
||||
cd->next_state = POP3_ERROR_DONE;
|
||||
return(MK_TCP_WRITE_ERROR);
|
||||
}
|
||||
@ -812,7 +811,7 @@ net_pop3_auth_response(ActiveEntry *ce)
|
||||
}
|
||||
else if (ce->status < 0)
|
||||
{
|
||||
int rv = SOCKET_ERRNO;
|
||||
int rv = PR_GetOSError();
|
||||
|
||||
TRACEMSG(("TCP Error: %d", rv));
|
||||
|
||||
|
@ -40,7 +40,6 @@
|
||||
#include "ssl.h"
|
||||
#include "imap.h"
|
||||
|
||||
#include "xp_error.h"
|
||||
#include "prefapi.h"
|
||||
|
||||
#ifdef AUTH_SKEY_DEFINED
|
||||
@ -313,7 +312,7 @@ net_smtp_response (ActiveEntry * cur_entry)
|
||||
if(CE_STATUS < 0)
|
||||
{
|
||||
CE_URL_S->error_msg =
|
||||
NET_ExplainErrorDetails(MK_TCP_READ_ERROR, SOCKET_ERRNO);
|
||||
NET_ExplainErrorDetails(MK_TCP_READ_ERROR, PR_GetOSError());
|
||||
|
||||
/* return TCP error
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user