diff options
author | Max Krasnyansky <maxk@qualcomm.com> | 2002-07-18 18:12:46 +0000 |
---|---|---|
committer | Max Krasnyansky <maxk@qualcomm.com> | 2002-07-18 18:12:46 +0000 |
commit | c5dca08e234386563667e8f790b4e1122c364c5d (patch) | |
tree | 8d87f52a29142b96b243e3a8e52def40ab7c2cd8 /hcid/main.c | |
parent | 99148a336433ac48bd8dc1fb23f4dc7cbf8c812e (diff) |
Support for multiple pairing modes.
Link key replacement.
Diffstat (limited to 'hcid/main.c')
-rw-r--r-- | hcid/main.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/hcid/main.c b/hcid/main.c index 37e6cf65..8a5371e5 100644 --- a/hcid/main.c +++ b/hcid/main.c @@ -249,7 +249,12 @@ static void init_defaults(void) static void sig_usr1(int sig) { - flush_link_keys(); + toggle_pairing(0); +} + +static void sig_usr2(int sig) +{ + toggle_pairing(1); } static void sig_term(int sig) @@ -357,6 +362,8 @@ int main(int argc, char *argv[], char *env[]) /* Default HCId settings */ hcid.config_file = HCID_CONFIG_FILE; hcid.host_name = get_host_name(); + hcid.security = HCID_SEC_AUTO; + hcid.pairing = HCID_PAIRING_MULTI; hcid.pin_file = strdup(HCID_PIN_FILE); hcid.pin_helper = strdup(HCID_PIN_HELPER); @@ -412,6 +419,8 @@ int main(int argc, char *argv[], char *env[]) 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); |