linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Frédéric Danis" <frederic.danis@linux.intel.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH 10/13] adapter: Remove support of pincodes storage file
Date: Mon, 17 Dec 2012 16:09:51 +0100	[thread overview]
Message-ID: <1355756994-18953-10-git-send-email-frederic.danis@linux.intel.com> (raw)
In-Reply-To: <1355756994-18953-1-git-send-email-frederic.danis@linux.intel.com>

This is no more supported in new storage.
---
 src/adapter.c |    3 +--
 src/storage.c |   20 --------------------
 src/storage.h |    1 -
 3 files changed, 1 insertion(+), 23 deletions(-)

diff --git a/src/adapter.c b/src/adapter.c
index 581c528..dd1b0b1 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -3594,8 +3594,7 @@ ssize_t btd_adapter_get_pin(struct btd_adapter *adapter, struct btd_device *dev,
 			return ret;
 	}
 
-	return read_pin_code(&adapter->bdaddr, device_get_address(dev),
-								pin_buf);
+	return -1;
 }
 
 int btd_adapter_set_fast_connectable(struct btd_adapter *adapter,
diff --git a/src/storage.c b/src/storage.c
index 35049f1..375974a 100644
--- a/src/storage.c
+++ b/src/storage.c
@@ -144,26 +144,6 @@ int read_local_name(const bdaddr_t *bdaddr, char *name)
 	return 0;
 }
 
-ssize_t read_pin_code(const bdaddr_t *local, const bdaddr_t *peer, char *pin)
-{
-	char filename[PATH_MAX + 1], addr[18], *str;
-	ssize_t len;
-
-	create_filename(filename, PATH_MAX, local, "pincodes");
-
-	ba2str(peer, addr);
-	str = textfile_get(filename, addr);
-	if (!str)
-		return -ENOENT;
-
-	strncpy(pin, str, 16);
-	len = strlen(pin);
-
-	free(str);
-
-	return len;
-}
-
 sdp_record_t *record_from_string(const gchar *str)
 {
 	sdp_record_t *rec;
diff --git a/src/storage.h b/src/storage.h
index 9a9c82f..8d171b0 100644
--- a/src/storage.h
+++ b/src/storage.h
@@ -27,7 +27,6 @@ int read_discoverable_timeout(const char *src, int *timeout);
 int read_pairable_timeout(const char *src, int *timeout);
 int read_on_mode(const char *src, char *mode, int length);
 int read_local_name(const bdaddr_t *bdaddr, char *name);
-ssize_t read_pin_code(const bdaddr_t *local, const bdaddr_t *peer, char *pin);
 sdp_record_t *record_from_string(const gchar *str);
 sdp_record_t *find_record_in_list(sdp_list_t *recs, const char *uuid);
 int read_device_pairable(const bdaddr_t *local, gboolean *mode);
-- 
1.7.9.5


  parent reply	other threads:[~2012-12-17 15:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-17 15:09 [PATCH 01/13] adapter: Add btd_adapter_for_each_device() Frédéric Danis
2012-12-17 15:09 ` [PATCH 02/13] alert: Use ccc file from device storage Frédéric Danis
2012-12-17 15:09 ` [PATCH 03/13] doc: Add device appearance in settings-storage doc Frédéric Danis
2012-12-17 15:09 ` [PATCH 04/13] adapter: Convert appearances file Frédéric Danis
2012-12-17 15:09 ` [PATCH 05/13] device: Load appearance from storage Frédéric Danis
2012-12-17 15:09 ` [PATCH 06/13] adapter: Convert gatt file Frédéric Danis
2012-12-17 15:09 ` [PATCH 07/13] gatt: Use new storage architecture Frédéric Danis
2012-12-17 15:09 ` [PATCH 08/13] adapter: Convert proximity file Frédéric Danis
2012-12-17 15:09 ` [PATCH 09/13] proximity: Use new storage architecture Frédéric Danis
2012-12-17 15:09 ` Frédéric Danis [this message]
2012-12-17 15:09 ` [PATCH 11/13] adapter: Fix invalid read in conversions Frédéric Danis
2012-12-17 15:09 ` [PATCH 12/13] bluetoothd: Remove storage info from man page Frédéric Danis
2012-12-17 15:09 ` [PATCH 13/13] TODO: Mark convert storage to ini-file item as done Frédéric Danis
2012-12-17 15:54 ` [PATCH 01/13] adapter: Add btd_adapter_for_each_device() Johan Hedberg

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=1355756994-18953-10-git-send-email-frederic.danis@linux.intel.com \
    --to=frederic.danis@linux.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;
as well as URLs for NNTP newsgroup(s).