* [PATCH] stemodem: fix issue with gatchat usage
@ 2011-01-29 19:03 Jeevaka Badrappan
2011-01-31 9:50 ` Marcel Holtmann
0 siblings, 1 reply; 2+ messages in thread
From: Jeevaka Badrappan @ 2011-01-29 19:03 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1333 bytes --]
---
drivers/stemodem/radio-settings.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/drivers/stemodem/radio-settings.c b/drivers/stemodem/radio-settings.c
index 5b50126..d6ed2e1 100644
--- a/drivers/stemodem/radio-settings.c
+++ b/drivers/stemodem/radio-settings.c
@@ -187,6 +187,15 @@ static void ste_set_rat_mode(struct ofono_radio_settings *rs,
}
}
+static gboolean ste_radio_settings_register(gpointer user)
+{
+ struct ofono_radio_settings *rs = user;
+
+ ofono_radio_settings_register(rs);
+
+ return FALSE;
+}
+
static int ste_radio_settings_probe(struct ofono_radio_settings *rs,
unsigned int vendor, void *data)
{
@@ -197,10 +206,10 @@ static int ste_radio_settings_probe(struct ofono_radio_settings *rs,
if (rsd == NULL)
return -ENOMEM;
- rsd->chat = chat;
+ rsd->chat = g_at_chat_clone(chat);
ofono_radio_settings_set_data(rs, rsd);
- ofono_radio_settings_register(rs);
+ g_idle_add(ste_radio_settings_register, rs);
return 0;
}
@@ -209,6 +218,8 @@ static void ste_radio_settings_remove(struct ofono_radio_settings *rs)
{
struct radio_settings_data *rsd = ofono_radio_settings_get_data(rs);
ofono_radio_settings_set_data(rs, NULL);
+
+ g_at_chat_unref(rsd->chat);
g_free(rsd);
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-01-31 9:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-29 19:03 [PATCH] stemodem: fix issue with gatchat usage Jeevaka Badrappan
2011-01-31 9:50 ` Marcel Holtmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox