diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2004-04-02 15:32:01 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2004-04-02 15:32:01 +0000 |
commit | 1f72ace38b1c7575e4ace602975a3e6915716952 (patch) | |
tree | 5d1029ff3964538a84560fb7b9f8cbfb69b8ca94 /tools/ciptool.c | |
parent | 719873a6b8d26c78b0a9a2380647e83c8e4bc05c (diff) |
Fix PSM value for big endian machines
Diffstat (limited to 'tools/ciptool.c')
-rw-r--r-- | tools/ciptool.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/ciptool.c b/tools/ciptool.c index 31984985..d9aa0085 100644 --- a/tools/ciptool.c +++ b/tools/ciptool.c @@ -167,7 +167,7 @@ static int do_connect(int ctl, int dev_id, bdaddr_t *src, bdaddr_t *dst, unsigne addr.l2_family = AF_BLUETOOTH; bacpy(&addr.l2_bdaddr, dst); - addr.l2_psm = psm; + addr.l2_psm = htobs(psm); if (connect(sk, (struct sockaddr *)&addr, sizeof(addr)) < 0) { perror("Can't connect L2CAP socket"); @@ -279,9 +279,9 @@ static void cmd_create(int ctl, bdaddr_t *bdaddr, int argc, char **argv) if (argc < 3) { if (!get_psm(&src, &dst, &psm)) - psm = htobs(4099); + psm = 4099; } else - psm = htobs(atoi(argv[2])); + psm = atoi(argv[2]); do_connect(ctl, dev_id, &src, &dst, psm, 0); } @@ -347,9 +347,9 @@ static void cmd_loopback(int ctl, bdaddr_t *bdaddr, int argc, char **argv) if (argc < 3) { if (!get_psm(&src, &dst, &psm)) - psm = htobs(4099); + psm = 4099; } else - psm = htobs(atoi(argv[2])); + psm = atoi(argv[2]); sk = do_connect(ctl, dev_id, &src, &dst, psm, (1 << CMTP_LOOPBACK)); |