summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@profusion.mobi>2011-02-01 15:12:44 -0200
committerMarcel Holtmann <marcel@holtmann.org>2011-02-01 18:31:02 +0100
commit730891328c1967b3dbdbb1b9fe094c936f600d00 (patch)
treeb26e6156fe94195684a22a494bce9b27aabf46df /drivers
parent80a257098a80ce593137bc72a55ed7ef00ab627b (diff)
downloadofono-730891328c1967b3dbdbb1b9fe094c936f600d00.tar.bz2
atmodem: use ofono_call initializer
Diffstat (limited to 'drivers')
-rw-r--r--drivers/atmodem/atutil.c4
-rw-r--r--drivers/atmodem/voicecall.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/drivers/atmodem/atutil.c b/drivers/atmodem/atutil.c
index a55b3f5c..01f54608 100644
--- a/drivers/atmodem/atutil.c
+++ b/drivers/atmodem/atutil.c
@@ -132,10 +132,12 @@ GSList *at_util_parse_clcc(GAtResult *result)
if (g_at_result_iter_next_string(&iter, &str))
g_at_result_iter_next_number(&iter, &number_type);
- call = g_try_new0(struct ofono_call, 1);
+ call = g_try_new(struct ofono_call, 1);
if (call == NULL)
break;
+ ofono_call_init(call);
+
call->id = id;
call->direction = dir;
call->status = status;
diff --git a/drivers/atmodem/voicecall.c b/drivers/atmodem/voicecall.c
index a64269d1..583e0370 100644
--- a/drivers/atmodem/voicecall.c
+++ b/drivers/atmodem/voicecall.c
@@ -112,10 +112,12 @@ static struct ofono_call *create_call(struct ofono_voicecall *vc, int type,
struct ofono_call *call;
/* Generate a call structure for the waiting call */
- call = g_try_new0(struct ofono_call, 1);
+ call = g_try_new(struct ofono_call, 1);
if (call == NULL)
return NULL;
+ ofono_call_init(call);
+
call->id = ofono_voicecall_get_next_callid(vc);
call->type = type;
call->direction = direction;