Re: [PATCH 01/12] include: Expose voicecall related enums to plugins

2018-06-25 Thread Denis Kenzior

Hi Slava,

Also, enum ofono_clir_option (which seems to be a 27.007 thing too) is 
defined in include/types.h which is a bit inconsistent.


It really isn't.  The CLIR option is a bit special because it uses a 
letter 'I', 'i' or default.  I suppose we could have used a 'char' type 
for this, but it isn't an actual number defined in 27.007.


Regards,
-Denis
___
ofono mailing list
ofono@ofono.org
https://lists.ofono.org/mailman/listinfo/ofono


Re: [PATCH 01/12] include: Expose voicecall related enums to plugins

2018-06-25 Thread Slava Monich

On 25/06/18 18:40, Denis Kenzior wrote:

Hi Slava,

On 06/21/2018 12:20 PM, Slava Monich wrote:

---
  include/types.h | 31 +++
  1 file changed, 31 insertions(+)



Can you help me understand what is the motivation behind this?  In the 
past we opted not to expose OFONO enums for well-known values (e.g. 
those defined in 27.007).


Obviously I didn't know that it was a conscious decision. Feel free to 
ignore all those patches then. It's just I have very low tolerance to 
duplicate definitions and magic numbers.


common.h is not available to dynamically loadable plugins built against 
ofono devel package.


Also, enum ofono_clir_option (which seems to be a 27.007 thing too) is 
defined in include/types.h which is a bit inconsistent.


Oh well.

-S.
___
ofono mailing list
ofono@ofono.org
https://lists.ofono.org/mailman/listinfo/ofono


Re: [PATCH 1/2] include: Add ofono_voicecall_get_modem

2018-06-25 Thread Denis Kenzior

Hi Slava,

On 06/20/2018 10:06 AM, Slava Monich wrote:

---
  include/voicecall.h | 2 ++
  1 file changed, 2 insertions(+)



Applied, thanks.

Regards,
-Denis

___
ofono mailing list
ofono@ofono.org
https://lists.ofono.org/mailman/listinfo/ofono


Re: [PATCH] voicecall: Handle voicecall_dbus_register() return value

2018-06-25 Thread Denis Kenzior

Hi Slava,

On 06/23/2018 11:08 AM, Slava Monich wrote:

FALSE means that struct voicecall passed in as a parameter
has been deallocated.
---
  src/voicecall.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)



Is there an actual issue you're fixing?  Or is this just a be paranoid 
patch?



diff --git a/src/voicecall.c b/src/voicecall.c
index e4f6a4c..194b75f 100644
--- a/src/voicecall.c
+++ b/src/voicecall.c
@@ -1391,7 +1391,9 @@ static struct voicecall *synthesize_outgoing_call(struct 
ofono_voicecall *vc,
v->detect_time = time(NULL);
  
  	DBG("Registering new call: %d", call->id);

-   voicecall_dbus_register(v);
+
+   if (!voicecall_dbus_register(v))
+   return NULL;


Okay, but you probably also want to release the callid which is being 
held above.


  
  	vc->call_list = g_slist_insert_sorted(vc->call_list, v, call_compare);
  



Regards,
-Denis
___
ofono mailing list
ofono@ofono.org
https://lists.ofono.org/mailman/listinfo/ofono