diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2011-01-20 12:13:17 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2011-01-20 12:13:17 +0100 |
commit | 63fd483fc912327ab6874ab6bfada0a246152ac5 (patch) | |
tree | c3f6e10c063e256be8f839af026d5794fef620bc | |
parent | e3f51d7507b35bfe26440628b7e480c6d67e7a23 (diff) | |
download | ofono-63fd483fc912327ab6874ab6bfada0a246152ac5.tar.bz2 |
atmodem: Always listen for bearer notifications
-rw-r--r-- | drivers/atmodem/gprs.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/atmodem/gprs.c b/drivers/atmodem/gprs.c index daa3933d..203a5f2e 100644 --- a/drivers/atmodem/gprs.c +++ b/drivers/atmodem/gprs.c @@ -220,17 +220,6 @@ static void cpsb_notify(GAtResult *result, gpointer user_data) ofono_gprs_bearer_notify(gprs, bearer); } -static void cpsb_set_cb(gboolean ok, GAtResult *result, gpointer user_data) -{ - struct ofono_gprs *gprs = user_data; - struct gprs_data *gd = ofono_gprs_get_data(gprs); - - if (!ok) - return; - - g_at_chat_register(gd->chat, "+CPSB:", cpsb_notify, FALSE, gprs, NULL); -} - static void gprs_initialized(gboolean ok, GAtResult *result, gpointer user_data) { struct ofono_gprs *gprs = user_data; @@ -238,9 +227,10 @@ static void gprs_initialized(gboolean ok, GAtResult *result, gpointer user_data) g_at_chat_register(gd->chat, "+CGEV:", cgev_notify, FALSE, gprs, NULL); g_at_chat_register(gd->chat, "+CGREG:", cgreg_notify, - FALSE, gprs, NULL); - g_at_chat_send(gd->chat, "AT+CPSB=1", none_prefix, - cpsb_set_cb, gprs, NULL); + FALSE, gprs, NULL); + g_at_chat_register(gd->chat, "+CPSB:", cpsb_notify, FALSE, gprs, NULL); + + g_at_chat_send(gd->chat, "AT+CPSB=1", none_prefix, NULL, NULL, NULL); switch (gd->vendor) { case OFONO_VENDOR_IFX: |