Browse Source

Use proper funtion prototypes

Georgi Chorbadzhiyski 7 years ago
parent
commit
ce42089e94
3 changed files with 9 additions and 7 deletions
  1. 2
    2
      config.h
  2. 5
    3
      tomcast.c
  3. 2
    2
      web_pages.c

+ 2
- 2
config.h View File

@@ -89,8 +89,8 @@ struct config {
89 89
 	pthread_mutex_t		channels_lock;
90 90
 };
91 91
 
92
-extern void do_reconnect();
93
-extern void do_reconf();
92
+extern void do_reconnect(int sig);
93
+extern void do_reconf(int sig);
94 94
 extern struct config *get_config(void);
95 95
 
96 96
 #endif

+ 5
- 3
tomcast.c View File

@@ -1065,7 +1065,8 @@ struct config *get_config(void) {
1065 1065
 	return &config;
1066 1066
 }
1067 1067
 
1068
-void do_reconnect() {
1068
+void do_reconnect(int sig) {
1069
+	(void)sig;
1069 1070
 	LNODE *l, *tmp;
1070 1071
 	list_lock(config.restreamer);
1071 1072
 	list_for_each(config.restreamer, l, tmp) {
@@ -1075,12 +1076,13 @@ void do_reconnect() {
1075 1076
 	list_unlock(config.restreamer);
1076 1077
 }
1077 1078
 
1078
-void do_reconf() {
1079
+void do_reconf(int sig) {
1080
+	(void)sig;
1079 1081
 	load_channels_config(&config);
1080 1082
 	spawn_proxy_threads(&config);
1081 1083
 }
1082 1084
 
1083
-void init_signals() {
1085
+void init_signals(void) {
1084 1086
 	signal(SIGCHLD, SIG_IGN);
1085 1087
 	signal(SIGPIPE, SIG_IGN);
1086 1088
 

+ 2
- 2
web_pages.c View File

@@ -116,12 +116,12 @@ void cmd_reconnect(int clientsock) {
116 116
 	pthread_mutex_lock(&cfg->channels_lock);
117 117
 	fdputsf(clientsock, "\nReconnecting %d inputs.\n", cfg->chanconf->items);
118 118
 	pthread_mutex_unlock(&cfg->channels_lock);
119
-	do_reconnect();
119
+	do_reconnect(1);
120 120
 }
121 121
 
122 122
 void cmd_reload(int clientsock) {
123 123
 	send_200_ok(clientsock);
124 124
 	send_header_textplain(clientsock);
125 125
 	fdputs(clientsock, "\nReloading config\n");
126
-	do_reconf();
126
+	do_reconf(1);
127 127
 }

Loading…
Cancel
Save