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
 	pthread_mutex_t		channels_lock;
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
 extern struct config *get_config(void);
94
 extern struct config *get_config(void);
95
 
95
 
96
 #endif
96
 #endif

+ 5
- 3
tomcast.c View File

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

+ 2
- 2
web_pages.c View File

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

Loading…
Cancel
Save