From 1193180d8bc3c987e5f82f8800434b71e4bdbc16 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Fri, 27 Nov 2009 10:29:19 -0300 Subject: [PATCH] obexd: Reduce the number of functions called to handle ftp specific mimetypes. --- obexd/plugins/ftp.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/obexd/plugins/ftp.c b/obexd/plugins/ftp.c index 7b768d139..5a1cc32d4 100644 --- a/obexd/plugins/ftp.c +++ b/obexd/plugins/ftp.c @@ -141,26 +141,16 @@ static const guint8 FTP_TARGET[TARGET_SIZE] = { 0xF9, 0xEC, 0x7B, 0xC4, 0x95, 0x3C, 0x11, 0xD2, 0x98, 0x4E, 0x52, 0x54, 0x00, 0xDC, 0x9E, 0x09 }; -static gint folder_listing(struct obex_session *os, size_t *size) -{ - return os_prepare_get(os, os->current_folder, size); -} - -static gint get_capability(struct obex_session *os, size_t *size) -{ - return os_prepare_get(os, os->server->capability, size); -} - static gint get_by_type(struct obex_session *os, gchar *type, size_t *size) { if (type == NULL) return -ENOENT; if (g_str_equal(type, CAP_TYPE)) - return get_capability(os, size); + return os_prepare_get(os, os->server->capability, size); if (g_str_equal(type, LST_TYPE)) - return folder_listing(os, size); + return os_prepare_get(os, os->current_folder, size); return FALSE; } -- 2.47.3