All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] obex: Add messages_get_message() implementation for MAP plugin
@ 2025-02-06 16:48 Amisha Jain
  2025-02-06 18:09 ` [v2] " bluez.test.bot
  2025-02-12 18:48 ` [PATCH v2] " Amisha Jain (QUIC)
  0 siblings, 2 replies; 4+ messages in thread
From: Amisha Jain @ 2025-02-06 16:48 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: quic_mohamull, quic_hbandi, quic_anubhavg

GET Message() operation should be supported for passing below PTS
testcases -
1.MAP/MSE/MMB/BV-12-C
Verify that the MSE can return an email message to the MCE.
2.MAP/MSE/MMB/BV-13-C
Verify that the MSE can return a SMS message in native format to the MCE.
3.MAP/MSE/MMB/BV-14-C
Verify that the MSE can return a SMS message with text trans-coded to UTF-8
to the MCE.

---
 obexd/plugins/mas.c            |  4 ++--
 obexd/plugins/messages-dummy.c | 32 +++++++++++++++++++++++++++++++-
 2 files changed, 33 insertions(+), 3 deletions(-)

diff --git a/obexd/plugins/mas.c b/obexd/plugins/mas.c
index 10b972d65..f63fcf6c6 100644
--- a/obexd/plugins/mas.c
+++ b/obexd/plugins/mas.c
@@ -612,11 +612,11 @@ static void *message_open(const char *name, int oflag, mode_t mode,
 		return NULL;
 	}
 
+	mas->buffer = g_string_new("");
+
 	*err = messages_get_message(mas->backend_data, name, 0,
 			get_message_cb, mas);
 
-	mas->buffer = g_string_new("");
-
 	if (*err < 0)
 		return NULL;
 	else
diff --git a/obexd/plugins/messages-dummy.c b/obexd/plugins/messages-dummy.c
index e313c6163..93648831a 100644
--- a/obexd/plugins/messages-dummy.c
+++ b/obexd/plugins/messages-dummy.c
@@ -516,7 +516,37 @@ int messages_get_message(void *session, const char *handle,
 					messages_get_message_cb callback,
 					void *user_data)
 {
-	return -ENOSYS;
+	struct session *s =  session;
+	FILE *fp;
+	char *path;
+	char buffer[1024];
+
+	DBG(" ");
+	path = g_build_filename(s->cwd_absolute, handle, NULL);
+	fp = fopen(path, "r");
+	if (fp == NULL)
+	{
+		DBG("fopen() failed");
+		return -EBADR;
+	}
+
+	/* 1024 is the maximum size of the line which is calculated to be more
+	 * sufficient*/
+	while (fgets(buffer, 1024, fp)) {
+		if (callback)
+		{
+			callback(session, 0, 0, (const char*)buffer, user_data);
+		}
+	}
+
+	if (callback)
+	{
+		callback(session, 0, 0, NULL, user_data);
+	}
+
+	g_free(path);
+	fclose(fp);
+	return 0;
 }
 
 int messages_update_inbox(void *session, messages_status_cb callback,
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* RE: [v2] obex: Add messages_get_message() implementation for MAP plugin
  2025-02-06 16:48 [PATCH v2] obex: Add messages_get_message() implementation for MAP plugin Amisha Jain
@ 2025-02-06 18:09 ` bluez.test.bot
  2025-02-12 18:48 ` [PATCH v2] " Amisha Jain (QUIC)
  1 sibling, 0 replies; 4+ messages in thread
From: bluez.test.bot @ 2025-02-06 18:09 UTC (permalink / raw)
  To: linux-bluetooth, quic_amisjain

[-- Attachment #1: Type: text/plain, Size: 1260 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=931275

---Test result---

Test Summary:
CheckPatch                    PENDING   0.21 seconds
GitLint                       PENDING   0.25 seconds
BuildEll                      PASS      20.81 seconds
BluezMake                     PASS      1598.52 seconds
MakeCheck                     PASS      13.92 seconds
MakeDistcheck                 PASS      161.51 seconds
CheckValgrind                 PASS      217.20 seconds
CheckSmatch                   PASS      288.93 seconds
bluezmakeextell               PASS      99.55 seconds
IncrementalBuild              PENDING   0.38 seconds
ScanBuild                     PASS      885.93 seconds

Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:

##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:

##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH v2] obex: Add messages_get_message() implementation for MAP plugin
  2025-02-06 16:48 [PATCH v2] obex: Add messages_get_message() implementation for MAP plugin Amisha Jain
  2025-02-06 18:09 ` [v2] " bluez.test.bot
@ 2025-02-12 18:48 ` Amisha Jain (QUIC)
  1 sibling, 0 replies; 4+ messages in thread
From: Amisha Jain (QUIC) @ 2025-02-12 18:48 UTC (permalink / raw)
  To: linux-bluetooth@vger.kernel.org
  Cc: Mohammed Sameer Mulla (QUIC), Harish Bandi (QUIC),
	Anubhav Gupta (QUIC)

Hi @linux-bluetooth@vger.kernel.org,
Please review the below patch.
Gentle reminder.

> -----Original Message-----
> From: Amisha Jain <quic_amisjain@quicinc.com>
> Sent: Thursday, February 6, 2025 10:19 PM
> To: linux-bluetooth@vger.kernel.org
> Cc: Mohammed Sameer Mulla (QUIC) <quic_mohamull@quicinc.com>;
> Harish Bandi (QUIC) <quic_hbandi@quicinc.com>; Anubhav Gupta (QUIC)
> <quic_anubhavg@quicinc.com>
> Subject: [PATCH v2] obex: Add messages_get_message() implementation for
> MAP plugin
> 
> GET Message() operation should be supported for passing below PTS
> testcases - 1.MAP/MSE/MMB/BV-12-C Verify that the MSE can return an email
> message to the MCE.
> 2.MAP/MSE/MMB/BV-13-C
> Verify that the MSE can return a SMS message in native format to the MCE.
> 3.MAP/MSE/MMB/BV-14-C
> Verify that the MSE can return a SMS message with text trans-coded to UTF-8
> to the MCE.
> 
> ---
>  obexd/plugins/mas.c            |  4 ++--
>  obexd/plugins/messages-dummy.c | 32
> +++++++++++++++++++++++++++++++-
>  2 files changed, 33 insertions(+), 3 deletions(-)
> 
> diff --git a/obexd/plugins/mas.c b/obexd/plugins/mas.c index
> 10b972d65..f63fcf6c6 100644
> --- a/obexd/plugins/mas.c
> +++ b/obexd/plugins/mas.c
> @@ -612,11 +612,11 @@ static void *message_open(const char *name, int
> oflag, mode_t mode,
>  		return NULL;
>  	}
> 
> +	mas->buffer = g_string_new("");
> +
>  	*err = messages_get_message(mas->backend_data, name, 0,
>  			get_message_cb, mas);
> 
> -	mas->buffer = g_string_new("");
> -
>  	if (*err < 0)
>  		return NULL;
>  	else
> diff --git a/obexd/plugins/messages-dummy.c b/obexd/plugins/messages-
> dummy.c index e313c6163..93648831a 100644
> --- a/obexd/plugins/messages-dummy.c
> +++ b/obexd/plugins/messages-dummy.c
> @@ -516,7 +516,37 @@ int messages_get_message(void *session, const char
> *handle,
>  					messages_get_message_cb callback,
>  					void *user_data)
>  {
> -	return -ENOSYS;
> +	struct session *s =  session;
> +	FILE *fp;
> +	char *path;
> +	char buffer[1024];
> +
> +	DBG(" ");
> +	path = g_build_filename(s->cwd_absolute, handle, NULL);
> +	fp = fopen(path, "r");
> +	if (fp == NULL)
> +	{
> +		DBG("fopen() failed");
> +		return -EBADR;
> +	}
> +
> +	/* 1024 is the maximum size of the line which is calculated to be more
> +	 * sufficient*/
> +	while (fgets(buffer, 1024, fp)) {
> +		if (callback)
> +		{
> +			callback(session, 0, 0, (const char*)buffer, user_data);
> +		}
> +	}
> +
> +	if (callback)
> +	{
> +		callback(session, 0, 0, NULL, user_data);
> +	}
> +
> +	g_free(path);
> +	fclose(fp);
> +	return 0;
>  }
> 
>  int messages_update_inbox(void *session, messages_status_cb callback,
> --
> 2.34.1
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [v2] obex: Add messages_get_message() implementation for MAP plugin
  2025-02-20  8:43 Amisha Jain
@ 2025-02-20 10:12 ` bluez.test.bot
  0 siblings, 0 replies; 4+ messages in thread
From: bluez.test.bot @ 2025-02-20 10:12 UTC (permalink / raw)
  To: linux-bluetooth, quic_amisjain

[-- Attachment #1: Type: text/plain, Size: 1261 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=935896

---Test result---

Test Summary:
CheckPatch                    PENDING   0.27 seconds
GitLint                       PENDING   0.29 seconds
BuildEll                      PASS      20.98 seconds
BluezMake                     PASS      1538.43 seconds
MakeCheck                     PASS      13.66 seconds
MakeDistcheck                 PASS      157.77 seconds
CheckValgrind                 PASS      214.57 seconds
CheckSmatch                   PASS      287.09 seconds
bluezmakeextell               PASS      100.70 seconds
IncrementalBuild              PENDING   0.34 seconds
ScanBuild                     PASS      887.16 seconds

Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:

##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:

##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-02-20 10:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-06 16:48 [PATCH v2] obex: Add messages_get_message() implementation for MAP plugin Amisha Jain
2025-02-06 18:09 ` [v2] " bluez.test.bot
2025-02-12 18:48 ` [PATCH v2] " Amisha Jain (QUIC)
  -- strict thread matches above, loose matches on Subject: below --
2025-02-20  8:43 Amisha Jain
2025-02-20 10:12 ` [v2] " bluez.test.bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.