diff options
| author | Marcel Holtmann <marcel@holtmann.org> | 2006-03-12 18:18:56 +0000 | 
|---|---|---|
| committer | Marcel Holtmann <marcel@holtmann.org> | 2006-03-12 18:18:56 +0000 | 
| commit | ba684cadb26bdbcaac8fb2b6f0739b44028fa3a7 (patch) | |
| tree | 018531b9fcfb8c535df8043d13235994db7ac59c | |
| parent | 020ac98f0656d3f95d1bb38ea546f145897446fa (diff) | |
Remove signal handling for switching pairing
| -rw-r--r-- | hcid/main.c | 14 | ||||
| -rw-r--r-- | hcid/security.c | 13 | 
2 files changed, 1 insertions, 26 deletions
| diff --git a/hcid/main.c b/hcid/main.c index 842a5826..03b49ff1 100644 --- a/hcid/main.c +++ b/hcid/main.c @@ -432,16 +432,6 @@ static void init_defaults(void)  	init_device_defaults(&default_device);  } -static void sig_usr1(int sig) -{ -	toggle_pairing(0); -} - -static void sig_usr2(int sig) -{ -	toggle_pairing(1); -} -  static void sig_term(int sig)  {  	g_main_quit(event_loop); @@ -616,10 +606,6 @@ int main(int argc, char *argv[], char *env[])  	sigaction(SIGINT,  &sa, NULL);  	sa.sa_handler = sig_hup;  	sigaction(SIGHUP, &sa, NULL); -	sa.sa_handler = sig_usr1; -	sigaction(SIGUSR1, &sa, NULL); -	sa.sa_handler = sig_usr2; -	sigaction(SIGUSR2, &sa, NULL);  	sa.sa_handler = SIG_IGN;  	sigaction(SIGCHLD, &sa, NULL); diff --git a/hcid/security.c b/hcid/security.c index f6d409f6..97637d79 100644 --- a/hcid/security.c +++ b/hcid/security.c @@ -58,17 +58,7 @@ struct g_io_info {  static struct g_io_info io_data[HCI_MAX_DEV]; -static int pairing; - -void toggle_pairing(int enable) -{ -	if (enable) -		pairing = hcid.pairing; -	else -		pairing = 0; - -	info("Pairing %s", pairing ? "enabled" : "disabled"); -} +static int pairing = HCID_PAIRING_MULTI;  static inline int get_bdaddr(int dev, bdaddr_t *sba, uint16_t handle, bdaddr_t *dba)  { @@ -510,7 +500,6 @@ static inline void auth_complete(int dev, bdaddr_t *sba, void *ptr)  	hcid_dbus_bonding_created_complete(sba, &dba, evt->status);  } -  static gboolean io_security_event(GIOChannel *chan, GIOCondition cond, gpointer data)  {  	unsigned char buf[HCI_MAX_EVENT_SIZE], *ptr = buf; | 
