projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
K&R style braces.
[tinc]
/
src
/
net_socket.c
diff --git
a/src/net_socket.c
b/src/net_socket.c
index
312030b
..
5f6cd2a
100644
(file)
--- a/
src/net_socket.c
+++ b/
src/net_socket.c
@@
-54,8
+54,7
@@
list_t *outgoing_list = NULL;
/* Setup sockets */
/* Setup sockets */
-static void configure_tcp(connection_t *c)
-{
+static void configure_tcp(connection_t *c) {
int option;
#ifdef O_NONBLOCK
int option;
#ifdef O_NONBLOCK
@@
-83,7
+82,7
@@
static void configure_tcp(connection_t *c)
#endif
}
#endif
}
-static bool bind_to_interface(int sd) {
/* {{{ */
+static bool bind_to_interface(int sd) {
char *iface;
#if defined(SOL_SOCKET) && defined(SO_BINDTODEVICE)
char *iface;
#if defined(SOL_SOCKET) && defined(SO_BINDTODEVICE)
@@
-110,9
+109,9
@@
static bool bind_to_interface(int sd) { /* {{{ */
#endif
return true;
#endif
return true;
-}
/* }}} bool bind_to_interface */
+}
-static bool bind_to_address(connection_t *c) {
/* {{{ */
+static bool bind_to_address(connection_t *c) {
char *node;
struct addrinfo *ai_list;
struct addrinfo *ai_ptr;
char *node;
struct addrinfo *ai_list;
struct addrinfo *ai_ptr;
@@
-168,10
+167,9
@@
static bool bind_to_address(connection_t *c) { /* {{{ */
freeaddrinfo(ai_list);
return status ? false : true;
freeaddrinfo(ai_list);
return status ? false : true;
-}
/* }}} bool bind_to_address */
+}
-int setup_listen_socket(const sockaddr_t *sa)
-{
+int setup_listen_socket(const sockaddr_t *sa) {
int nfd;
char *addrstr;
int option;
int nfd;
char *addrstr;
int option;
@@
-234,8
+232,7
@@
int setup_listen_socket(const sockaddr_t *sa)
return nfd;
}
return nfd;
}
-int setup_vpn_in_socket(const sockaddr_t *sa)
-{
+int setup_vpn_in_socket(const sockaddr_t *sa) {
int nfd;
char *addrstr;
int option;
int nfd;
char *addrstr;
int option;
@@
-311,8
+308,7
@@
int setup_vpn_in_socket(const sockaddr_t *sa)
return nfd;
} /* int setup_vpn_in_socket */
return nfd;
} /* int setup_vpn_in_socket */
-void retry_outgoing(outgoing_t *outgoing)
-{
+void retry_outgoing(outgoing_t *outgoing) {
event_t *event;
cp();
event_t *event;
cp();
@@
-333,8
+329,7
@@
void retry_outgoing(outgoing_t *outgoing)
outgoing->timeout);
}
outgoing->timeout);
}
-void finish_connecting(connection_t *c)
-{
+void finish_connecting(connection_t *c) {
cp();
ifdebug(CONNECTIONS) logger(LOG_INFO, _("Connected to %s (%s)"), c->name, c->hostname);
cp();
ifdebug(CONNECTIONS) logger(LOG_INFO, _("Connected to %s (%s)"), c->name, c->hostname);
@@
-346,8
+341,7
@@
void finish_connecting(connection_t *c)
send_id(c);
}
send_id(c);
}
-void do_outgoing_connection(connection_t *c)
-{
+void do_outgoing_connection(connection_t *c) {
char *address, *port;
int result;
char *address, *port;
int result;
@@
-442,8
+436,7
@@
begin:
return;
}
return;
}
-void setup_outgoing_connection(outgoing_t *outgoing)
-{
+void setup_outgoing_connection(outgoing_t *outgoing) {
connection_t *c;
node_t *n;
connection_t *c;
node_t *n;
@@
-489,8
+482,7
@@
void setup_outgoing_connection(outgoing_t *outgoing)
accept a new tcp connect and create a
new connection
*/
accept a new tcp connect and create a
new connection
*/
-bool handle_new_meta_connection(int sock)
-{
+bool handle_new_meta_connection(int sock) {
connection_t *c;
sockaddr_t sa;
int fd;
connection_t *c;
sockaddr_t sa;
int fd;
@@
-542,8
+534,7
@@
void free_outgoing(outgoing_t *outgoing) {
free(outgoing);
}
free(outgoing);
}
-void try_outgoing_connections(void)
-{
+void try_outgoing_connections(void) {
static config_t *cfg = NULL;
char *name;
outgoing_t *outgoing;
static config_t *cfg = NULL;
char *name;
outgoing_t *outgoing;