From: Zhenhua Zhang <zhenhua.zhang@intel.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH] sdp: Remove sdp_general_inquiry API
Date: Wed, 18 Aug 2010 18:13:30 +0800 [thread overview]
Message-ID: <1282126410-6157-1-git-send-email-zhenhua.zhang@intel.com> (raw)
So that sdp.c won't include hci.h and hci_lib.h. The inquiry operation
could be done by simply invoking hci_inquiry().
---
lib/sdp.c | 16 ----------------
lib/sdp_lib.h | 5 -----
tools/sdptool.c | 6 ++++--
3 files changed, 4 insertions(+), 23 deletions(-)
diff --git a/lib/sdp.c b/lib/sdp.c
index 8a31b55..76695af 100644
--- a/lib/sdp.c
+++ b/lib/sdp.c
@@ -43,8 +43,6 @@
#include <netinet/in.h>
#include "bluetooth.h"
-#include "hci.h"
-#include "hci_lib.h"
#include "l2cap.h"
#include "sdp.h"
#include "sdp_lib.h"
@@ -4523,20 +4521,6 @@ end:
return status;
}
-/*
- * Find devices in the piconet.
- */
-int sdp_general_inquiry(inquiry_info *ii, int num_dev, int duration, uint8_t *found)
-{
- int n = hci_inquiry(-1, 10, num_dev, NULL, &ii, 0);
- if (n < 0) {
- SDPERR("Inquiry failed:%s", strerror(errno));
- return -1;
- }
- *found = n;
- return 0;
-}
-
int sdp_close(sdp_session_t *session)
{
struct sdp_transaction *t;
diff --git a/lib/sdp_lib.h b/lib/sdp_lib.h
index e506ac1..5ad4b56 100644
--- a/lib/sdp_lib.h
+++ b/lib/sdp_lib.h
@@ -146,11 +146,6 @@ int sdp_service_search_attr_async(sdp_session_t *session, const sdp_list_t *sear
uint16_t sdp_gen_tid(sdp_session_t *session);
-/*
- * find all devices in the piconet
- */
-int sdp_general_inquiry(inquiry_info *ii, int dev_num, int duration, uint8_t *found);
-
/* flexible extraction of basic attributes - Jean II */
int sdp_get_int_attr(const sdp_record_t *rec, uint16_t attr, int *value);
int sdp_get_string_attr(const sdp_record_t *rec, uint16_t attr, char *value, int valuelen);
diff --git a/tools/sdptool.c b/tools/sdptool.c
index d06b159..3ce0fc3 100644
--- a/tools/sdptool.c
+++ b/tools/sdptool.c
@@ -3733,11 +3733,13 @@ static int cmd_del(int argc, char **argv)
static void inquiry(handler_t handler, void *arg)
{
inquiry_info ii[20];
- uint8_t count = 0;
+ int count = 0;
int i;
printf("Inquiring ...\n");
- if (sdp_general_inquiry(ii, 20, 8, &count) < 0) {
+
+ count = hci_inquiry(-1, 10, 20, NULL, (inquiry_info **) &ii, 0);
+ if (count < 0) {
printf("Inquiry failed\n");
return;
}
--
1.7.0.4
next reply other threads:[~2010-08-18 10:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-18 10:13 Zhenhua Zhang [this message]
2010-08-18 11:59 ` [PATCH] sdp: Remove sdp_general_inquiry API Marcel Holtmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1282126410-6157-1-git-send-email-zhenhua.zhang@intel.com \
--to=zhenhua.zhang@intel.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox