From: Zhenhua Zhang <[email protected]>

DUN server want to get latest GPRS status.
---
 include/gprs.h |    2 ++
 src/gprs.c     |    9 +++++++++
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/include/gprs.h b/include/gprs.h
index 7985115..05cc086 100644
--- a/include/gprs.h
+++ b/include/gprs.h
@@ -86,6 +86,8 @@ unsigned int __ofono_gprs_add_status_watch(struct ofono_gprs 
*gprs,
 gboolean __ofono_gprs_remove_status_watch(struct ofono_gprs *gprs,
                                                unsigned int id);
 
+int ofono_gprs_get_status(struct ofono_gprs *gprs);
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/src/gprs.c b/src/gprs.c
index 895d95b..4ef33ef 100644
--- a/src/gprs.c
+++ b/src/gprs.c
@@ -2487,6 +2487,15 @@ void ofono_gprs_context_set_type(struct 
ofono_gprs_context *gc,
        gc->type = type;
 }
 
+
+int ofono_gprs_get_status(struct ofono_gprs *gprs)
+{
+       if (gprs == NULL)
+               return -1;
+
+       return gprs->status;
+}
+
 int ofono_gprs_driver_register(const struct ofono_gprs_driver *d)
 {
        DBG("driver: %p, name: %s", d, d->name);
-- 
1.7.1

---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris, 
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Reply via email to