Fit in 80 symbols per line

This commit is contained in:
2018-07-03 18:26:36 +03:00
parent 43550b2c5a
commit 238c8fac48
3 changed files with 36 additions and 18 deletions

View File

@@ -180,15 +180,20 @@ static int open_listener(int port)
}
if (set_reuse_addr(sd) < 0) {
log(ERROR,
"Failed to set reuse on address - Aborting RMPS...", port);
"Failed to set reuse on address - Aborting RMPS...",
port);
exit(EXIT_FAILURE);
}
if (bind(sd, (struct sockaddr *)&addr, sizeof(addr)) != 0) {
log(ERROR, "Failed to bind on port: %d - Aborting RMPS...", port);
log(ERROR,
"Failed to bind on port: %d - Aborting RMPS...",
port);
exit(EXIT_FAILURE);
}
if (listen(sd, 10) != 0) {
log(ERROR, "Failed to start listener on port %d - Aborting RMPS...", port);
log(ERROR,
"Failed to start listener on port %d - Aborting RMPS...",
port);
exit(EXIT_FAILURE);
}
return sd;
@@ -231,7 +236,8 @@ void load_certificates(SSL_CTX *ctx, const char *certfile,
const char *keyfile, const char *cafile)
{
/* set the local certificate from certfile */
if (SSL_CTX_use_certificate_file(ctx, certfile, SSL_FILETYPE_PEM) <= 0) {
if (SSL_CTX_use_certificate_file(ctx, certfile,
SSL_FILETYPE_PEM) <= 0) {
log(ERROR, "Failed to load certfile! SSL error below:");
log_ssl();
log(INFO, "RMPS failed to start, shutting down...");