OSDN Git Service

core: Remove unused delete_record function
authorJohan Hedberg <johan.hedberg@intel.com>
Fri, 14 Dec 2012 09:37:45 +0000 (11:37 +0200)
committerJohan Hedberg <johan.hedberg@intel.com>
Fri, 14 Dec 2012 09:37:45 +0000 (11:37 +0200)
src/storage.c
src/storage.h

index 5b5b3d5..0cd8b73 100644 (file)
@@ -267,31 +267,6 @@ sdp_record_t *record_from_string(const gchar *str)
        return rec;
 }
 
-
-int delete_record(const gchar *src, const gchar *dst, uint8_t dst_type,
-                                                       const uint32_t handle)
-{
-       char filename[PATH_MAX + 1], old_key[28], key[30];
-       int err, ret;
-
-       create_name(filename, PATH_MAX, STORAGEDIR, src, "sdp");
-
-       snprintf(key, sizeof(key), "%17s#%hhu#%08X", dst, dst_type, handle);
-       snprintf(old_key, sizeof(old_key), "%17s#%08X", dst, handle);
-
-       err = 0;
-       ret = textfile_del(filename, key);
-       if (ret)
-               err = ret;
-
-       /* Try old format (address#handle) */
-       ret = textfile_del(filename, old_key);
-       if (ret)
-               err = ret;
-
-       return err;
-}
-
 sdp_record_t *find_record_in_list(sdp_list_t *recs, const char *uuid)
 {
        sdp_list_t *seq;
index a77ee8a..7b6bad9 100644 (file)
@@ -36,8 +36,6 @@ int write_lastused_info(const bdaddr_t *local, const bdaddr_t *peer,
                                        uint8_t peer_type, struct tm *tm);
 ssize_t read_pin_code(const bdaddr_t *local, const bdaddr_t *peer, char *pin);
 sdp_record_t *record_from_string(const gchar *str);
-int delete_record(const gchar *src, const gchar *dst, uint8_t dst_type,
-                                                       const uint32_t handle);
 sdp_record_t *find_record_in_list(sdp_list_t *recs, const char *uuid);
 int read_device_pairable(const bdaddr_t *local, gboolean *mode);
 int write_device_primaries(const bdaddr_t *sba, const bdaddr_t *dba,