diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2007-05-21 13:06:49 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2007-05-21 13:06:49 +0000 |
commit | 541d39d1abbca808107c830dcda7c72c4525be6a (patch) | |
tree | 2d1d2c678b4a2d67320a6c155c2feefb62fb222c /hcid/main.c | |
parent | a849556fef64f864b5bb6cd2899696a55fbd33db (diff) |
Add MTU option for the built-in SDP server
Diffstat (limited to 'hcid/main.c')
-rw-r--r-- | hcid/main.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/hcid/main.c b/hcid/main.c index 7cbf679a..c73c03e0 100644 --- a/hcid/main.c +++ b/hcid/main.c @@ -675,7 +675,7 @@ static void usage(void) { printf("hcid - HCI daemon ver %s\n", VERSION); printf("Usage: \n"); - printf("\thcid [-n] [-d] [-s] [-f config file]\n"); + printf("\thcid [-n] [-d] [-s] [-m mtu] [-f config file]\n"); } int main(int argc, char *argv[]) @@ -684,6 +684,7 @@ int main(int argc, char *argv[]) struct hci_filter flt; struct sigaction sa; GIOChannel *ctl_io, *child_io; + uint16_t mtu = 0; int opt, daemonize = 1, debug = 0, sdp = 0, experimental = 0; /* Default HCId settings */ @@ -702,7 +703,7 @@ int main(int argc, char *argv[]) init_defaults(); - while ((opt = getopt(argc, argv, "ndsxf:")) != EOF) { + while ((opt = getopt(argc, argv, "ndsm:xf:")) != EOF) { switch (opt) { case 'n': daemonize = 0; @@ -716,6 +717,10 @@ int main(int argc, char *argv[]) sdp = 1; break; + case 'm': + mtu = atoi(optarg); + break; + case 'x': experimental = 1; break; @@ -825,7 +830,7 @@ int main(int argc, char *argv[]) if (sdp) { set_sdp_server_enable(); - start_sdp_server(0, hcid.deviceid, SDP_SERVER_COMPAT); + start_sdp_server(mtu, hcid.deviceid, SDP_SERVER_COMPAT); } notify_init(); |