All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] atmodem: Restore multiparty call after reconnection
@ 2014-10-08  9:53 Sergio Checa Blanco
  2014-10-08 15:17 ` Denis Kenzior
  0 siblings, 1 reply; 2+ messages in thread
From: Sergio Checa Blanco @ 2014-10-08  9:53 UTC (permalink / raw)
  To: ofono

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

From: Sergio Checa Blanco <sergio.checa@bmw-carit.de>

When the HFP profile is disconnected while a multiparty call is
ongoing, and it is reconnected again, oFono requests the list of
current calls to the device with AT+CLCC. In the case of a multiparty
call, the response to CLCC is being taken as multiple simple calls.

The attribute mpty parsed in function at_util_parse_clcc is never
used nor stored, so there is no way to recompose the information
about multi-party calls after a reconnection.

This patch stores this attribute coming in the +CLCC response to be
checked later on when the CallAdded signal is broadcasted. By doing
this the information about the multi-party character of a call is
not lost on the way from the +CLCC response to the emitted D-Bus
signal.
---
 drivers/atmodem/atutil.c | 1 +
 include/types.h          | 1 +
 src/voicecall.c          | 5 +++++
 3 files changed, 7 insertions(+)

diff --git a/drivers/atmodem/atutil.c b/drivers/atmodem/atutil.c
index 1487348..08626b1 100644
--- a/drivers/atmodem/atutil.c
+++ b/drivers/atmodem/atutil.c
@@ -164,6 +164,7 @@ GSList *at_util_parse_clcc(GAtResult *result, unsigned int *ret_mpty_ids)
 		call->direction = dir;
 		call->status = status;
 		call->type = type;
+		call->multiparty = mpty;
 		strncpy(call->phone_number.number, str,
 				OFONO_MAX_PHONE_NUMBER_LENGTH);
 		call->phone_number.type = number_type;
diff --git a/include/types.h b/include/types.h
index 9a7dfd9..16755ce 100644
--- a/include/types.h
+++ b/include/types.h
@@ -91,6 +91,7 @@ struct ofono_call {
 	int type;
 	int direction;
 	int status;
+	ofono_bool_t multiparty;
 	struct ofono_phone_number phone_number;
 	struct ofono_phone_number called_number;
 	char name[OFONO_MAX_CALLER_NAME_LENGTH + 1];
diff --git a/src/voicecall.c b/src/voicecall.c
index d11a4cd..8bf0631 100644
--- a/src/voicecall.c
+++ b/src/voicecall.c
@@ -2343,6 +2343,11 @@ void ofono_voicecall_notify(struct ofono_voicecall *vc,
 
 	vc->call_list = g_slist_insert_sorted(vc->call_list, v, call_compare);
 
+	if (call->multiparty) {
+		vc->multiparty_list = g_slist_insert_sorted(
+			vc->multiparty_list, v, call_compare);
+	}
+
 	voicecalls_emit_call_added(vc, v);
 
 	return;
-- 
2.1.1


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

end of thread, other threads:[~2014-10-08 15:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-08  9:53 [PATCH] atmodem: Restore multiparty call after reconnection Sergio Checa Blanco
2014-10-08 15:17 ` Denis Kenzior

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.