Browse Source

Fix typos and type warnings

master
Ondrej Kuznk 9 years ago committed by Yves Rutschle
parent
commit
025545aee3
  1. 8
      common.c
  2. 2
      sslh-main.c
  3. 2
      sslh-select.c
  4. 2
      t

8
common.c

@ -230,7 +230,7 @@ void dump_connection(struct connection *cnx) @@ -230,7 +230,7 @@ void dump_connection(struct connection *cnx)
/*
* moves data from one fd to other
*
* retuns number of bytes copied if success
* returns number of bytes copied if success
* returns 0 (FD_CNXCLOSED) if incoming socket closed
* returns FD_NODATA if no data was available
* returns FD_STALLED if data was read, could not be written, and has been
@ -265,7 +265,7 @@ int fd2fd(struct queue *target_q, struct queue *from_q) @@ -265,7 +265,7 @@ int fd2fd(struct queue *target_q, struct queue *from_q)
size_w = write(target, buffer, size_r);
/* process -1 when we know how to deal with it */
if ((size_w == -1)) {
if (size_w == -1) {
switch (errno) {
case EAGAIN:
/* write blocked: Defer data */
@ -479,7 +479,7 @@ void setup_signals(void) @@ -479,7 +479,7 @@ void setup_signals(void)
res = sigaction(SIGCHLD, &action, NULL);
CHECK_RES_DIE(res, "sigaction");
/* Set SIGTERM to exit. For some reason if it's not set explicitely,
/* Set SIGTERM to exit. For some reason if it's not set explicitly,
* coverage information is lost when killing the process */
memset(&action, 0, sizeof(action));
action.sa_handler = exit;
@ -509,7 +509,7 @@ void setup_syslog(const char* bin_name) { @@ -509,7 +509,7 @@ void setup_syslog(const char* bin_name) {
log_message(LOG_INFO, "%s %s started\n", server_type, VERSION);
}
/* We don't want to run as root -- drop priviledges if required */
/* We don't want to run as root -- drop privileges if required */
void drop_privileges(const char* user_name)
{
int res;

2
sslh-main.c

@ -275,7 +275,7 @@ static int config_parse(char *filename, struct addrinfo **listen, struct proto * @@ -275,7 +275,7 @@ static int config_parse(char *filename, struct addrinfo **listen, struct proto *
config_lookup_bool(&config, "numeric", &numeric);
config_lookup_bool(&config, "transparent", &transparent);
if (config_lookup_int(&config, "timeout", &timeout) == CONFIG_TRUE) {
if (config_lookup_int(&config, "timeout", (int *)&timeout) == CONFIG_TRUE) {
probing_timeout = timeout;
}

2
sslh-select.c

@ -188,7 +188,7 @@ int is_fd_active(int fd, fd_set* set) @@ -188,7 +188,7 @@ int is_fd_active(int fd, fd_set* set)
}
/* Main loop: the idea is as follow:
* - fds_r and fds_w contain the file descritors to monitor in read and write
* - fds_r and fds_w contain the file descriptors to monitor in read and write
* - When a file descriptor goes off, process it: read from it, write the data
* to its corresponding pair.
* - When a file descriptor blocks when writing, remove the read fd from fds_r,

2
t

@ -58,7 +58,7 @@ for my $binary (@binaries) { @@ -58,7 +58,7 @@ for my $binary (@binaries) {
my $cmd = "./$binary -v -f -u $user --listen localhost:$sslh_port --ssh $ssh_address --ssl $ssl_address -P $pidfile";
warn "$cmd\n";
#exec $cmd;
exec "valgrind --leak-check=full ./sslh-select -v -f -u $user --listen localhost:$sslh_port --ssh $ssh_address -ssl $ssl_address -P $pidfile";
exec "valgrind --leak-check=full ./$binary -v -f -u $user --listen localhost:$sslh_port --ssh $ssh_address -ssl $ssl_address -P $pidfile";
exit 0;
}
warn "spawned $sslh_pid\n";

Loading…
Cancel
Save