Diff between d485fe8bbd5749c9d4df117a7af999be646bc04a and 5ec3275a2e8bd3fb2f360faeb862da0bca2e68a0

Changed Files

File Additions Deletions Status
obexd/plugins/ftp.c +4 -4 modified
obexd/plugins/opp.c +3 -3 modified
obexd/plugins/pbap.c +3 -3 modified
obexd/plugins/syncevolution.c +1 -1 modified
obexd/src/obex.c +3 -3 modified
obexd/src/obex.h +8 -12 modified

Full Patch

diff --git a/obexd/plugins/ftp.c b/obexd/plugins/ftp.c
index 2cacd50..82cb708 100644
--- a/obexd/plugins/ftp.c
+++ b/obexd/plugins/ftp.c
@@ -227,7 +227,7 @@ fail:
 
 static gint ftp_delete(struct OBEX_session *os)
 {
-	const char *name = obex_session_get_name(os);
+	const char *name = obex_get_name(os);
 	const char *folder = obex_get_folder(os);
 	gchar *path;
 	int ret = 0;
@@ -265,8 +265,8 @@ static gint ftp_chkput(obex_t *obex, obex_object_t *obj)
 static obex_rsp_t ftp_put(struct OBEX_session *os)
 {
 	const char *folder = obex_get_folder(os);
-	const char *name = obex_session_get_name(os);
-	ssize_t size = obex_session_get_size(os);
+	const char *name = obex_get_name(os);
+	ssize_t size = obex_get_size(os);
 	int ret = 0;
 
 	if (folder == NULL)
@@ -305,7 +305,7 @@ static obex_rsp_t ftp_setpath(struct OBEX_session *os, obex_object_t *obj)
 		return OBEX_RSP_PRECONDITION_FAILED;
 	}
 
-	name = obex_session_get_name(os);
+	name = obex_get_name(os);
 	root_folder = obex_get_root_folder(os);
 	current_folder = obex_get_folder(os);
 	root = g_str_equal(root_folder, current_folder);
diff --git a/obexd/plugins/opp.c b/obexd/plugins/opp.c
index a57edff..2df3d12 100644
--- a/obexd/plugins/opp.c
+++ b/obexd/plugins/opp.c
@@ -152,7 +152,7 @@ skip_auth:
 
 static obex_rsp_t opp_put(struct OBEX_session *os)
 {
-	const char *name = obex_session_get_name(os);
+	const char *name = obex_get_name(os);
 	const char *folder = obex_get_folder(os);
 
 	if (folder == NULL)
@@ -168,10 +168,10 @@ static obex_rsp_t opp_get(struct OBEX_session *os)
 {
 	const char *type;
 
-	if (obex_session_get_name(os) == NULL)
+	if (obex_get_name(os) == NULL)
 		return OBEX_RSP_FORBIDDEN;
 
-	type = obex_session_get_type(os);
+	type = obex_get_type(os);
 
 	if (type == NULL)
 		return OBEX_RSP_FORBIDDEN;
diff --git a/obexd/plugins/pbap.c b/obexd/plugins/pbap.c
index 4efdf23..90c427f 100644
--- a/obexd/plugins/pbap.c
+++ b/obexd/plugins/pbap.c
@@ -388,8 +388,8 @@ static obex_rsp_t pbap_connect(struct OBEX_session *os)
 static obex_rsp_t pbap_get(struct OBEX_session *os)
 {
 	int addbody = TRUE;
-	const char *type = obex_session_get_type(os);
-	const char *name = obex_session_get_name(os);
+	const char *type = obex_get_type(os);
+	const char *name = obex_get_name(os);
 	int err;
 
 	if (type == NULL)
@@ -471,7 +471,7 @@ static obex_rsp_t pbap_setpath(struct OBEX_session *os, obex_object_t *obj)
 	}
 
 	current_folder = obex_get_folder(os);
-	name = obex_session_get_name(os);
+	name = obex_get_name(os);
 
 	/* Check "Backup" flag */
 	if ((nonhdr[0] & 0x01) == 0x01) {
diff --git a/obexd/plugins/syncevolution.c b/obexd/plugins/syncevolution.c
index bd4d09a..5f78952 100644
--- a/obexd/plugins/syncevolution.c
+++ b/obexd/plugins/syncevolution.c
@@ -350,7 +350,7 @@ static obex_rsp_t synce_put(struct OBEX_session *os)
 	DBusMessage *msg;
 	DBusMessageIter iter, array_iter;
 	DBusPendingCall *call;
-	const char *type = obex_session_get_type(os);
+	const char *type = obex_get_type(os);
 
 	context = find_context(os);
 	if (!context)
diff --git a/obexd/src/obex.c b/obexd/src/obex.c
index 94898a9..addfc2a 100644
--- a/obexd/src/obex.c
+++ b/obexd/src/obex.c
@@ -1098,17 +1098,17 @@ struct obex_session *obex_get_session(gpointer object)
 	return NULL;
 }
 
-const char *obex_session_get_name(struct OBEX_session *os)
+const char *obex_get_name(struct OBEX_session *os)
 {
 	return os->name;
 }
 
-ssize_t obex_session_get_size(struct OBEX_session *os)
+ssize_t obex_get_size(struct OBEX_session *os)
 {
 	return os->size;
 }
 
-const char *obex_session_get_type(struct OBEX_session *os)
+const char *obex_get_type(struct OBEX_session *os)
 {
 	return os->type;
 }
diff --git a/obexd/src/obex.h b/obexd/src/obex.h
index 527d42d..d352349 100644
--- a/obexd/src/obex.h
+++ b/obexd/src/obex.h
@@ -89,22 +89,18 @@ void obex_connect_cb(GIOChannel *io, GError *err, gpointer user_data);
 
 gint obex_session_start(GIOChannel *io, struct server *server);
 struct obex_session *obex_get_session(gpointer object);
-gint obex_tty_session_stop(void);
-
 int obex_stream_start(struct OBEX_session *os, gchar *filename);
 gint os_prepare_put(struct obex_session *os);
-
-void server_free(struct server *server);
-
-int tty_init(gint service, const gchar *folder, const gchar *capability,
-		gboolean symlinks, const gchar *devnode);
-void tty_closed(void);
-
-const char *obex_session_get_name(struct OBEX_session *os);
-ssize_t obex_session_get_size(struct OBEX_session *os);
-const char *obex_session_get_type(struct OBEX_session *os);
+const char *obex_get_name(struct OBEX_session *os);
+ssize_t obex_get_size(struct OBEX_session *os);
+const char *obex_get_type(struct OBEX_session *os);
 const char *obex_get_folder(struct OBEX_session *os);
 void obex_set_folder(struct OBEX_session *os, const char *folder);
 const char *obex_get_root_folder(struct OBEX_session *os);
 gboolean obex_get_symlinks(struct OBEX_session *os);
 
+void server_free(struct server *server);
+int tty_init(gint service, const gchar *folder, const gchar *capability,
+		gboolean symlinks, const gchar *devnode);
+gint obex_tty_session_stop(void);
+void tty_closed(void);