projects
/
privoxy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c905b1a
)
In rfc2553_connect_to() and no_rfc2553_connect_to(), factor the socket() call out...
author
Fabian Keil
<fk@fabiankeil.de>
Sun, 27 Mar 2011 13:57:28 +0000
(13:57 +0000)
committer
Fabian Keil
<fk@fabiankeil.de>
Sun, 27 Mar 2011 13:57:28 +0000
(13:57 +0000)
jbsockets.c
patch
|
blob
|
history
diff --git
a/jbsockets.c
b/jbsockets.c
index
5d428f6
..
867c1fe
100644
(file)
--- a/
jbsockets.c
+++ b/
jbsockets.c
@@
-1,4
+1,4
@@
-const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.
89 2011/03/27 13:56:4
8 fabiankeil Exp $";
+const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.
90 2011/03/27 13:57:0
8 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jbsockets.c,v $
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jbsockets.c,v $
@@
-254,11
+254,11
@@
static jb_socket rfc2553_connect_to(const char *host, int portnum, struct client
continue;
}
continue;
}
+ fd = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol);
#ifdef _WIN32
#ifdef _WIN32
- if ((fd = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol)) ==
- JB_INVALID_SOCKET)
+ if (fd == JB_INVALID_SOCKET)
#else
#else
- if (
(fd = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol))
< 0)
+ if (
fd
< 0)
#endif
{
continue;
#endif
{
continue;
@@
-426,10
+426,11
@@
static jb_socket no_rfc2553_connect_to(const char *host, int portnum, struct cli
}
#endif /* ndef _WIN32 */
}
#endif /* ndef _WIN32 */
+ fd = socket(inaddr.sin_family, SOCK_STREAM, 0);
#ifdef _WIN32
#ifdef _WIN32
- if (
(fd = socket(inaddr.sin_family, SOCK_STREAM, 0))
== JB_INVALID_SOCKET)
+ if (
fd
== JB_INVALID_SOCKET)
#else
#else
- if (
(fd = socket(inaddr.sin_family, SOCK_STREAM, 0))
< 0)
+ if (
fd
< 0)
#endif
{
return(JB_INVALID_SOCKET);
#endif
{
return(JB_INVALID_SOCKET);