Parcourir la source

cdp: changed format

Morten Tryfoss il y a 1 an
Parent
commit
4045f3d7c0
2 fichiers modifiés avec 11 ajouts et 11 suppressions
  1. 3 3
      src/modules/cdp/cdp_mod.c
  2. 8 8
      src/modules/cdp/receiver.c

+ 3 - 3
src/modules/cdp/cdp_mod.c

@@ -239,7 +239,7 @@ static int cdp_init(void)
 		return 1;
 	}
 
-	#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
 	if(enable_tls) {
 		init_ssl_methods();
 		method = tls_parse_method(&tls_method);
@@ -248,12 +248,12 @@ static int cdp_init(void)
 			return -1;
 		}
 	}
-	#else
+#else
 	if(enable_tls) {
 		LM_ERR("TLS requires openssl 1.1.0 or newer\n");
 		return -1;
 	}
-	#endif
+#endif
 
 	register_procs(2 + config->workers + 2 * config->peers_cnt);
 	cfg_register_child(2 + config->workers + 2 * config->peers_cnt);

+ 8 - 8
src/modules/cdp/receiver.c

@@ -813,12 +813,12 @@ int receive_loop(peer *original_peer)
 								p->R_sock = fd;
 							}
 
-							#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
 							if(enable_tls) {
 								to_ssl(&sp2->tls_ctx, &sp2->tls_conn,
 										sp->tcp_socket, method);
 							}
-							#endif
+#endif
 						} else {
 							sp2 = add_serviced_peer(NULL);
 							if(!sp2) {
@@ -826,12 +826,12 @@ int receive_loop(peer *original_peer)
 								continue;
 							}
 							sp2->tcp_socket = fd;
-							#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
 							if(enable_tls) {
 								to_ssl(&sp2->tls_ctx, &sp2->tls_conn,
 										sp->tcp_socket, method);
 							}
-							#endif
+#endif
 						}
 					}
 				}
@@ -883,9 +883,9 @@ int receive_loop(peer *original_peer)
 										sp->p ? sp->p->fqdn.s : "",
 										sp->tcp_socket, strerror(errno));
 								AAAFreeMessage(&msg);
-								#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
 								cleanup_ssl(sp->tls_ctx, sp->tls_conn);
-								#endif
+#endif
 								close(sp->tcp_socket);
 								goto drop_peer;
 							}
@@ -898,9 +898,9 @@ int receive_loop(peer *original_peer)
 										sp->p ? sp->p->fqdn.s : "",
 										sp->tcp_socket, cnt, msg->buf.len);
 								AAAFreeMessage(&msg);
-								#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
 								cleanup_ssl(sp->tls_ctx, sp->tls_conn);
-								#endif
+#endif
 								close(sp->tcp_socket);
 								goto drop_peer;
 							}