Open Source Telephony
 help / color / mirror / Atom feed
* [PATCH 1/2] gatchat: Fix parsing fields with odd number of quotation marks
@ 2016-11-10  9:22 Kuba Pawlak
  2016-11-10  9:22 ` [PATCH 2/2] bluez5: fix crash on DBus transport disconnection Kuba Pawlak
  2016-11-10 16:18 ` [PATCH 1/2] gatchat: Fix parsing fields with odd number of quotation marks Denis Kenzior
  0 siblings, 2 replies; 3+ messages in thread
From: Kuba Pawlak @ 2016-11-10  9:22 UTC (permalink / raw)
  To: ofono

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

Events like +CLCC and +CCWA can have contact name attached to the
end of line. If this field contains odd number of quotation marks,
parser will eventually reject such message as malformatted.
---
 gatchat/gatsyntax.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gatchat/gatsyntax.c b/gatchat/gatsyntax.c
index 800e35f..4d01ed7 100644
--- a/gatchat/gatsyntax.c
+++ b/gatchat/gatsyntax.c
@@ -309,6 +309,12 @@ static GAtSyntaxResult gsm_permissive_feed(GAtSyntax *syntax,
 		case GSM_PERMISSIVE_STATE_RESPONSE_STRING:
 			if (byte == '"')
 				syntax->state = GSM_PERMISSIVE_STATE_RESPONSE;
+			else if (byte == '\r') {
+				syntax->state = GSM_PERMISSIVE_STATE_IDLE;
+				i += 1;
+				res = G_AT_SYNTAX_RESULT_LINE;
+				goto out;
+			}
 			break;
 
 		case GSM_PERMISSIVE_STATE_GUESS_PDU:
-- 
2.5.5

Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928


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

* [PATCH 2/2] bluez5: fix crash on DBus transport disconnection
  2016-11-10  9:22 [PATCH 1/2] gatchat: Fix parsing fields with odd number of quotation marks Kuba Pawlak
@ 2016-11-10  9:22 ` Kuba Pawlak
  2016-11-10 16:18 ` [PATCH 1/2] gatchat: Fix parsing fields with odd number of quotation marks Denis Kenzior
  1 sibling, 0 replies; 3+ messages in thread
From: Kuba Pawlak @ 2016-11-10  9:22 UTC (permalink / raw)
  To: ofono

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

Do not register dbus notification if message failed to be sent out
because transport was already disconnected
---
 plugins/bluez5.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/plugins/bluez5.c b/plugins/bluez5.c
index 979076e..e72e352 100644
--- a/plugins/bluez5.c
+++ b/plugins/bluez5.c
@@ -155,8 +155,10 @@ void bt_unregister_profile(DBusConnection *conn, const char *object)
 		return;
 	}
 
-	dbus_pending_call_set_notify(c, unregister_profile_cb, NULL, NULL);
-	dbus_pending_call_unref(c);
+	if (c) {
+		dbus_pending_call_set_notify(c, unregister_profile_cb, NULL, NULL);
+		dbus_pending_call_unref(c);
+	}
 
 	dbus_message_unref(msg);
 }
-- 
2.5.5

Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928


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

* Re: [PATCH 1/2] gatchat: Fix parsing fields with odd number of quotation marks
  2016-11-10  9:22 [PATCH 1/2] gatchat: Fix parsing fields with odd number of quotation marks Kuba Pawlak
  2016-11-10  9:22 ` [PATCH 2/2] bluez5: fix crash on DBus transport disconnection Kuba Pawlak
@ 2016-11-10 16:18 ` Denis Kenzior
  1 sibling, 0 replies; 3+ messages in thread
From: Denis Kenzior @ 2016-11-10 16:18 UTC (permalink / raw)
  To: ofono

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

Hi Kuba,

On 11/10/2016 03:22 AM, Kuba Pawlak wrote:
> Events like +CLCC and +CCWA can have contact name attached to the
> end of line. If this field contains odd number of quotation marks,
> parser will eventually reject such message as malformatted.
> ---
>   gatchat/gatsyntax.c | 6 ++++++
>   1 file changed, 6 insertions(+)
>

Both applied, thanks.

Regards,
-Denis


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

end of thread, other threads:[~2016-11-10 16:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-10  9:22 [PATCH 1/2] gatchat: Fix parsing fields with odd number of quotation marks Kuba Pawlak
2016-11-10  9:22 ` [PATCH 2/2] bluez5: fix crash on DBus transport disconnection Kuba Pawlak
2016-11-10 16:18 ` [PATCH 1/2] gatchat: Fix parsing fields with odd number of quotation marks Denis Kenzior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox