Browse code

- fixed compilation without tcp support (no -DUSE_TCP)

Andrei Pelinescu-Onciul authored on 30/04/2008 19:53:04
Showing 3 changed files
... ...
@@ -525,8 +525,8 @@ static const char* core_tcpinfo_doc[] = {
525 525
 
526 526
 static void core_tcpinfo(rpc_t* rpc, void* c)
527 527
 {
528
-	void *handle;
529 528
 #ifdef USE_TCP
529
+	void *handle;
530 530
 	struct tcp_gen_info ti;
531 531
 
532 532
 	if (!tcp_disable){
... ...
@@ -555,8 +555,8 @@ static const char* core_tcp_options_doc[] = {
555 555
 
556 556
 static void core_tcp_options(rpc_t* rpc, void* c)
557 557
 {
558
-	void *handle;
559 558
 #ifdef USE_TCP
559
+	void *handle;
560 560
 	struct tcp_cfg_options t;
561 561
 
562 562
 	if (!tcp_disable){
... ...
@@ -479,10 +479,10 @@ void cleanup(show_status)
479 479
 	cfg_destroy();
480 480
 #ifdef USE_TCP
481 481
 	destroy_tcp();
482
-#endif
483 482
 #ifdef USE_TLS
484 483
 	destroy_tls();
485
-#endif
484
+#endif /* USE_TLS */
485
+#endif /* USE_TCP */
486 486
 	destroy_timer();
487 487
 	destroy_script_cb();
488 488
 	destroy_nonsip_hooks();
... ...
@@ -26,6 +26,7 @@
26 26
 #ifndef tcp_options_h
27 27
 #define tcp_options_h
28 28
 
29
+#ifdef USE_TCP
29 30
 
30 31
 #ifndef NO_TCP_BUF_WRITE
31 32
 #define TCP_BUF_WRITE /* enabled buffered writing */
... ...
@@ -106,6 +107,7 @@
106 106
 #endif /* __OS_ */
107 107
 #endif /* NO_TCP_QUICKACK */
108 108
 
109
+#endif /* USE_TCP */
109 110
 
110 111
 struct tcp_cfg_options{
111 112
 	/* ser tcp options */