summaryrefslogtreecommitdiff
path: root/tools/btgatt-server.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2018-11-28 16:01:40 +0200
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2018-12-05 08:55:26 -0300
commitb597afa45a40ed2720659649e77dd25b45383fc0 (patch)
tree583c4a846d826d0e23b866408e512747c7470009 /tools/btgatt-server.c
parent5202ea57a8fda7b298bb920a05c349897377abc1 (diff)
downloadbluez-b597afa45a40ed2720659649e77dd25b45383fc0.tar.gz
shared/mainloop: Remove mainloop_set_signal
This removes mainloop_set_signal and replaces it usage with mainloop_run_with_signal.
Diffstat (limited to 'tools/btgatt-server.c')
-rw-r--r--tools/btgatt-server.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/tools/btgatt-server.c b/tools/btgatt-server.c
index 89812bd75..bc32789d9 100644
--- a/tools/btgatt-server.c
+++ b/tools/btgatt-server.c
@@ -1139,7 +1139,6 @@ int main(int argc, char *argv[])
int sec = BT_SECURITY_LOW;
uint8_t src_type = BDADDR_LE_PUBLIC;
uint16_t mtu = 0;
- sigset_t mask;
bool hr_visible = false;
struct server *server;
@@ -1250,15 +1249,9 @@ int main(int argc, char *argv[])
printf("Running GATT server\n");
- sigemptyset(&mask);
- sigaddset(&mask, SIGINT);
- sigaddset(&mask, SIGTERM);
-
- mainloop_set_signal(&mask, signal_cb, NULL, NULL);
-
print_prompt();
- mainloop_run();
+ mainloop_run_with_signal(signal_cb, NULL);
printf("\n\nShutting down...\n");