* [PATCH] call-settings: use enum values
@ 2011-01-25 23:46 Lucas De Marchi
2011-01-26 5:33 ` Denis Kenzior
0 siblings, 1 reply; 2+ messages in thread
From: Lucas De Marchi @ 2011-01-25 23:46 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1374 bytes --]
Use the enum values defined for CLIP, CNAP, CLIR, COLP and COLR.
---
src/call-settings.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/call-settings.c b/src/call-settings.c
index 109f130..8dd2564 100644
--- a/src/call-settings.c
+++ b/src/call-settings.c
@@ -1179,11 +1179,11 @@ static DBusMessage *set_clir(DBusMessage *msg, struct ofono_call_settings *cs,
return __ofono_error_not_implemented(msg);
if (!strcmp(setting, "default"))
- clir = 0;
+ clir = CLIR_STATUS_NOT_PROVISIONED;
else if (!strcmp(setting, "enabled"))
- clir = 1;
+ clir = CLIR_STATUS_PROVISIONED_PERMANENT;
else if (!strcmp(setting, "disabled"))
- clir = 2;
+ clir = CLIR_STATUS_UNKNOWN;
if (clir == -1)
return __ofono_error_invalid_format(msg);
@@ -1411,11 +1411,11 @@ struct ofono_call_settings *ofono_call_settings_create(struct ofono_modem *modem
return NULL;
/* Set all the settings to unknown state */
- cs->clip = 2;
- cs->cnap = 2;
- cs->clir = 2;
- cs->colp = 2;
- cs->colr = 2;
+ cs->clip = CLIP_STATUS_UNKNOWN;
+ cs->cnap = CNAP_STATUS_UNKNOWN;
+ cs->clir = CLIR_STATUS_UNKNOWN;
+ cs->colp = COLP_STATUS_UNKNOWN;
+ cs->colr = COLR_STATUS_UNKNOWN;
cs->atom = __ofono_modem_add_atom(modem, OFONO_ATOM_TYPE_CALL_SETTINGS,
call_settings_remove, cs);
--
1.7.3.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] call-settings: use enum values
2011-01-25 23:46 [PATCH] call-settings: use enum values Lucas De Marchi
@ 2011-01-26 5:33 ` Denis Kenzior
0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2011-01-26 5:33 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 296 bytes --]
Hi Lucas,
On 01/25/2011 05:46 PM, Lucas De Marchi wrote:
> Use the enum values defined for CLIP, CNAP, CLIR, COLP and COLR.
> ---
> src/call-settings.c | 16 ++++++++--------
> 1 files changed, 8 insertions(+), 8 deletions(-)
>
Patch has been applied, thanks.
Regards,
-Denis
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-01-26 5:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-25 23:46 [PATCH] call-settings: use enum values Lucas De Marchi
2011-01-26 5:33 ` 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.