---
 drivers/huaweimodem/voicecall.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/drivers/huaweimodem/voicecall.c b/drivers/huaweimodem/voicecall.c
index f55568d..36a16a1 100644
--- a/drivers/huaweimodem/voicecall.c
+++ b/drivers/huaweimodem/voicecall.c
@@ -49,7 +49,8 @@ struct voicecall_data {
 };
 
 static struct ofono_call *create_call(struct ofono_voicecall *vc, int type,
-                                       int direction, int status,
+                                       enum ofono_call_direction direction,
+                                       enum ofono_call_status status,
                                        const char *num, int num_type,
                                        int clip, int id)
 {
@@ -178,7 +179,7 @@ static void cring_notify(GAtResult *result, gpointer 
user_data)
 
        /* CRING can repeat, ignore if we already have an incoming call */
        if (g_slist_find_custom(vd->calls,
-                               GINT_TO_POINTER(CALL_STATUS_INCOMING),
+                               GINT_TO_POINTER(OFONO_CALL_STATUS_INCOMING),
                                at_util_call_compare_by_status))
                return;
 
@@ -200,7 +201,8 @@ static void cring_notify(GAtResult *result, gpointer 
user_data)
        id = ofono_voicecall_get_next_callid(vc);
 
        /* Generate an incoming call */
-       create_call(vc, type, 1, CALL_STATUS_INCOMING, NULL, 128, 2, id);
+       create_call(vc, type, OFONO_CALL_DIRECTION_MOBILE_TERMINATED,
+                               OFONO_CALL_STATUS_INCOMING, NULL, 128, 2, id);
 
        /* Assume the CLIP always arrives, and we signal the call there */
        DBG("%d", type);
@@ -217,7 +219,7 @@ static void clip_notify(GAtResult *result, gpointer 
user_data)
        struct ofono_call *call;
 
        l = g_slist_find_custom(vd->calls,
-                               GINT_TO_POINTER(CALL_STATUS_INCOMING),
+                               GINT_TO_POINTER(OFONO_CALL_STATUS_INCOMING),
                                at_util_call_compare_by_status);
        if (l == NULL) {
                ofono_error("CLIP for unknown call");
@@ -316,8 +318,9 @@ static void orig_notify(GAtResult *result, gpointer 
user_data)
 
        ofono_info("Call origin: id %d type %d", call_id, call_type);
 
-       call = create_call(vc, call_type, 0, CALL_STATUS_DIALING, NULL, 128, 2,
-                           call_id);
+       call = create_call(vc, call_type,
+                       OFONO_CALL_DIRECTION_MOBILE_ORIGINATED,
+                       OFONO_CALL_STATUS_DIALING, NULL, 128, 2, call_id);
        if (call == NULL) {
                ofono_error("Unable to malloc, call tracking will fail!");
                return;
@@ -355,7 +358,7 @@ static void conf_notify(GAtResult *result, gpointer 
user_data)
 
        /* Set call to alerting */
        call = l->data;
-       call->status = CALL_STATUS_ALERTING;
+       call->status = OFONO_CALL_STATUS_ALERTING;
 
        if (call->type == 0)
                ofono_voicecall_notify(vc, call);
@@ -392,7 +395,7 @@ static void conn_notify(GAtResult *result, gpointer 
user_data)
 
        /* Set call to active */
        call = l->data;
-       call->status = CALL_STATUS_ACTIVE;
+       call->status = OFONO_CALL_STATUS_ACTIVE;
 
        if (call->type == 0)
                ofono_voicecall_notify(vc, call);
-- 
1.9.1

_______________________________________________
ofono mailing list
[email protected]
https://lists.ofono.org/mailman/listinfo/ofono

Reply via email to