From 217169ef49c638b8352e8c053e392c8b701a02bf Mon Sep 17 00:00:00 2001 From: Claudio Takahasi Date: Tue, 6 Apr 2010 18:51:47 -0300 Subject: [PATCH] obexd: Remove unused functions and constants --- obexd/plugins/pbap.c | 26 +------------------------- obexd/plugins/phonebook-ebook.c | 1 + 2 files changed, 2 insertions(+), 25 deletions(-) diff --git a/obexd/plugins/pbap.c b/obexd/plugins/pbap.c index 9794d2758..88f4769ec 100644 --- a/obexd/plugins/pbap.c +++ b/obexd/plugins/pbap.c @@ -73,9 +73,6 @@ #define PHONEBOOKSIZE_LEN 2 #define NEWMISSEDCALLS_LEN 1 -#define MCH "telecom/mch.vcf" -#define SIM1_MCH "SIM1/telecom/mch.vcf" - #define PBAP_CHANNEL 15 #define PBAP_RECORD " \ @@ -126,7 +123,6 @@ struct aparam_header { } __attribute__ ((packed)); struct cache { - gboolean ready; gboolean valid; guint32 index; gchar *folder; @@ -165,22 +161,6 @@ static void cache_entry_free(struct cache_entry *entry) g_free(entry->tel); g_free(entry); } -#if 0 -static void cache_foreach(struct cache *cache, cache_sort_f sort, - cache_element_f elem, gpointer user_data) -{ - - GSList *l; - - /* TODO: sort not implemented */ - - for (l = cache->entries; l; l = l->next) { - struct cache_entry *entry = l->data; - - elem(entry, user_data); - } -} -#endif static gboolean entry_name_find(const struct cache_entry *entry, const gchar *value) @@ -367,9 +347,9 @@ static struct apparam_field *parse_aparam(const guint8 *buffer, guint32 hlen) { struct apparam_field *param; struct aparam_header *hdr; + guint64 val64; guint32 len = 0; guint16 val16; - guint64 val64; param = g_new0(struct apparam_field, 1); @@ -633,10 +613,6 @@ static gpointer vobject_list_open(const char *name, int oflag, mode_t mode, /* PullvCardListing always get the contacts from the cache */ - /* - * FIXME: When the name is given and the OBEX non header flags are - * provided it is necessary to check if the cache still valid. - */ if (pbap->cache.valid) { cache_ready_notify(pbap); goto done; diff --git a/obexd/plugins/phonebook-ebook.c b/obexd/plugins/phonebook-ebook.c index 7afcf09c8..dc825801d 100644 --- a/obexd/plugins/phonebook-ebook.c +++ b/obexd/plugins/phonebook-ebook.c @@ -189,6 +189,7 @@ static void ebook_entry_cb(EBook *book, EBookStatus estatus, data->cb(vcard, len, 1, 0, data->user_data); + g_free(vcard); g_free(data); } -- 2.47.3