From ac34869fba11bd17c66bc44ceed4bd3a2709b20c Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Sep 05 2017 09:22:53 +0000 Subject: Remove upstreamed patches --- diff --git a/0001-core-profile-Fix-calling-service_accept.patch b/0001-core-profile-Fix-calling-service_accept.patch deleted file mode 100644 index 74ee377..0000000 --- a/0001-core-profile-Fix-calling-service_accept.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 71633478a8dfac2a5865fe567e8754b0276a904e Mon Sep 17 00:00:00 2001 -From: Luiz Augusto von Dentz -Date: Mon, 24 Oct 2016 19:32:57 +0300 -Subject: [PATCH] core/profile: Fix calling service_accept - -service_accept shall only be used with profiles that implement .accept -callback, to set connecting state directly use service_set_connecting -which does not require .accept to be implemented. ---- - src/profile.c | 2 +- - src/service.c | 19 +++++++++++++++++++ - src/service.h | 1 + - 3 files changed, 21 insertions(+), 1 deletion(-) - -diff --git a/src/profile.c b/src/profile.c -index c81a9f9..7c5318c 100644 ---- a/src/profile.c -+++ b/src/profile.c -@@ -1047,7 +1047,7 @@ static void ext_connect(GIOChannel *io, GError *err, gpointer user_data) - conn); - } - -- if (conn->service && service_accept(conn->service) < 0) -+ if (conn->service && service_set_connecting(conn->service) < 0) - goto drop; - - if (send_new_connection(ext, conn)) -diff --git a/src/service.c b/src/service.c -index 20a41d0..207ffae 100644 ---- a/src/service.c -+++ b/src/service.c -@@ -214,6 +214,25 @@ done: - return 0; - } - -+int service_set_connecting(struct btd_service *service) -+{ -+ switch (service->state) { -+ case BTD_SERVICE_STATE_UNAVAILABLE: -+ return -EINVAL; -+ case BTD_SERVICE_STATE_DISCONNECTED: -+ break; -+ case BTD_SERVICE_STATE_CONNECTING: -+ case BTD_SERVICE_STATE_CONNECTED: -+ return 0; -+ case BTD_SERVICE_STATE_DISCONNECTING: -+ return -EBUSY; -+ } -+ -+ change_state(service, BTD_SERVICE_STATE_CONNECTING, 0); -+ -+ return 0; -+} -+ - int btd_service_connect(struct btd_service *service) - { - struct btd_profile *profile = service->profile; -diff --git a/src/service.h b/src/service.h -index c1f97f6..6f1edfb 100644 ---- a/src/service.h -+++ b/src/service.h -@@ -49,6 +49,7 @@ int service_probe(struct btd_service *service); - void service_remove(struct btd_service *service); - - int service_accept(struct btd_service *service); -+int service_set_connecting(struct btd_service *service); - - /* Connection control API */ - int btd_service_connect(struct btd_service *service); --- -2.7.4 - diff --git a/0001-obexd-Allow-CreateFolder-to-create-a-directory.patch b/0001-obexd-Allow-CreateFolder-to-create-a-directory.patch deleted file mode 100644 index 8ffa1ae..0000000 --- a/0001-obexd-Allow-CreateFolder-to-create-a-directory.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 16102009366f25a7ba3531c235d65461b5012372 Mon Sep 17 00:00:00 2001 -From: Marek Kasik -Date: Thu, 30 Jun 2016 17:01:27 -0400 -Subject: [PATCH 1/2] obexd: Allow CreateFolder to create a directory - -When the remote device sends the 'CreateFolder' command, obexd -first tries to verify the path in ftp_setpath(). Because we are -creating a new directory, the verify_path() is expected to fail (it does -not exist yet; ENOENT). - -Trap that special case and cause the function to fail directly to the -create directory path. ---- - obexd/plugins/ftp.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/obexd/plugins/ftp.c b/obexd/plugins/ftp.c -index a906527..3ee18a6 100644 ---- a/obexd/plugins/ftp.c -+++ b/obexd/plugins/ftp.c -@@ -278,6 +278,8 @@ int ftp_setpath(struct obex_session *os, void *user_data) - DBG("Fullname: %s", fullname); - - err = verify_path(fullname); -+ if (err == -ENOENT) -+ goto not_found; - - if (err < 0) - goto done; --- -1.8.3.1 - diff --git a/0002-obexd-Return-dummy_data-instead-of-int-in-phonebook-.patch b/0002-obexd-Return-dummy_data-instead-of-int-in-phonebook-.patch deleted file mode 100644 index 9630f85..0000000 --- a/0002-obexd-Return-dummy_data-instead-of-int-in-phonebook-.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 6c75f43e50d754b4605498a8a68d2be4bc19ee37 Mon Sep 17 00:00:00 2001 -From: Marek Kasik -Date: Thu, 30 Jun 2016 17:01:28 -0400 -Subject: [PATCH 2/2] obexd: Return dummy_data instead of int in - phonebook-dummy - -There are two functions in phonebook-dummy that were returning -'int's instead of 'struct dummy_data' - -phonebook_create_cache -phonebook_get_entry - -As a result, when an obex-client sends the GetSize command, the obexd -on the server segfaults. - -Fix this by storing the id and returning the dummy_data struct. - -The GetSize test now passes correctly. ---- - obexd/plugins/phonebook-dummy.c | 15 ++++++++------- - 1 file changed, 8 insertions(+), 7 deletions(-) - -diff --git a/obexd/plugins/phonebook-dummy.c b/obexd/plugins/phonebook-dummy.c -index eeb078f..29ae889 100644 ---- a/obexd/plugins/phonebook-dummy.c -+++ b/obexd/plugins/phonebook-dummy.c -@@ -520,7 +520,6 @@ void *phonebook_get_entry(const char *folder, const char *id, - struct dummy_data *dummy; - char *filename; - int fd; -- guint ret; - - filename = g_build_filename(root_folder, folder, id, NULL); - -@@ -538,13 +537,13 @@ void *phonebook_get_entry(const char *folder, const char *id, - dummy->apparams = params; - dummy->fd = fd; - -- ret = g_idle_add_full(G_PRIORITY_DEFAULT_IDLE, read_entry, dummy, -+ dummy->id = g_idle_add_full(G_PRIORITY_DEFAULT_IDLE, read_entry, dummy, - dummy_free); - - if (err) - *err = 0; - -- return GINT_TO_POINTER(ret); -+ return dummy; - } - - void *phonebook_create_cache(const char *name, phonebook_entry_cb entry_cb, -@@ -553,7 +552,7 @@ void *phonebook_create_cache(const char *name, phonebook_entry_cb entry_cb, - struct cache_query *query; - char *foldername; - DIR *dp; -- guint ret; -+ struct dummy_data *dummy; - - foldername = g_build_filename(root_folder, name, NULL); - dp = opendir(foldername); -@@ -572,11 +571,13 @@ void *phonebook_create_cache(const char *name, phonebook_entry_cb entry_cb, - query->user_data = user_data; - query->dp = dp; - -- ret = g_idle_add_full(G_PRIORITY_DEFAULT_IDLE, create_cache, query, -- query_free); -+ dummy = g_new0(struct dummy_data, 1); -+ -+ dummy->id = g_idle_add_full(G_PRIORITY_DEFAULT_IDLE, create_cache, -+ query, query_free); - - if (err) - *err = 0; - -- return GINT_TO_POINTER(ret); -+ return dummy; - } --- -1.8.3.1 -