[dvblast-devel] [PATCH 3/4] Rename b_hup_received to b_conf_reload.
Georgi Chorbadzhiyski
gf at unixsol.org
Thu Aug 25 14:59:39 CEST 2011
This variable is used to signal configuration reload by
SIGHUP signal and over command socket so the new name is
better suited.
---
comm.c | 2 +-
dvblast.c | 10 +++++-----
dvblast.h | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/comm.c b/comm.c
index ec2ab0f..171aead 100644
--- a/comm.c
+++ b/comm.c
@@ -103,7 +103,7 @@ void comm_Read( void )
switch ( i_command )
{
case CMD_RELOAD:
- b_hup_received = 1;
+ b_conf_reload = 1;
i_answer = RET_OK;
i_answer_size = 0;
break;
diff --git a/dvblast.c b/dvblast.c
index 3e35f3d..2facb8c 100644
--- a/dvblast.c
+++ b/dvblast.c
@@ -94,7 +94,7 @@ const char *psz_native_charset = "UTF-8";
const char *psz_dvb_charset = "ISO_8859-1";
print_type_t i_print_type = -1;
-volatile sig_atomic_t b_hup_received = 0;
+volatile sig_atomic_t b_conf_reload = 0;
volatile sig_atomic_t b_exit_now = 0;
int i_verbose = DEFAULT_VERBOSITY;
int i_syslog = 0;
@@ -390,7 +390,7 @@ static void config_ReadFile( char *psz_file )
static void SigHandler( int i_signal )
{
if ( i_signal == SIGHUP )
- b_hup_received = 1;
+ b_conf_reload = 1;
if ( i_signal == SIGINT )
b_exit_now = 1;
}
@@ -940,10 +940,10 @@ int main( int i_argc, char **pp_argv )
break;
}
- if ( b_hup_received )
+ if ( b_conf_reload )
{
- b_hup_received = 0;
- msg_Warn( NULL, "HUP received, reloading" );
+ b_conf_reload = 0;
+ msg_Info( NULL, "Configuration reload was requested." );
config_ReadFile( psz_conf_file );
}
diff --git a/dvblast.h b/dvblast.h
index ecdd6ca..82d1ec1 100644
--- a/dvblast.h
+++ b/dvblast.h
@@ -165,7 +165,7 @@ extern uint16_t i_network_id;
extern uint8_t *p_network_name;
extern size_t i_network_name_size;
extern mtime_t i_wallclock;
-extern volatile int b_hup_received;
+extern volatile int b_conf_reload;
extern volatile int b_exit_now;
extern int i_comm_fd;
extern char *psz_udp_src;
--
1.7.5.1
More information about the dvblast-devel
mailing list