diff options
author | Denis Kenzior <denkenz@gmail.com> | 2011-01-26 14:49:22 -0600 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2011-01-26 14:55:58 -0600 |
commit | 5e5eed9f83af539ad697bed755ac72a46845b030 (patch) | |
tree | 35cf087ed096baf496997dba036f32ce2c4f6239 | |
parent | 712d97802194ae41b709f9c57914be572b245c5c (diff) |
examples: Update gprs-provision to the new API
-rw-r--r-- | examples/provision.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/examples/provision.c b/examples/provision.c index 80688a42..356b0b36 100644 --- a/examples/provision.c +++ b/examples/provision.c @@ -26,6 +26,8 @@ #include <string.h> #include <glib.h> +#include <errno.h> + #define OFONO_API_SUBJECT_TO_CHANGE #include <ofono/modem.h> @@ -34,7 +36,7 @@ #include <ofono/plugin.h> #include <ofono/log.h> -static void example_provision_get_settings(const char *mcc, const char *mnc, +static int example_provision_get_settings(const char *mcc, const char *mnc, struct ofono_gprs_provision_data **settings, int *count) { @@ -46,13 +48,13 @@ static void example_provision_get_settings(const char *mcc, const char *mnc, mcc, mnc); if (strcmp(mcc, "246") != 0 || strcmp(mnc, "81") != 0) - return; + return -ENOENT; ofono_debug("Creating example settings for phonesim"); *settings = g_try_new0(struct ofono_gprs_provision_data, 2); if (*settings == NULL) - return; + return -ENOMEM; *count = 2; @@ -71,6 +73,8 @@ static void example_provision_get_settings(const char *mcc, const char *mnc, (*settings)[1].password = g_strdup("mmspass"); (*settings)[1].message_proxy = g_strdup("10.11.12.13:8080"); (*settings)[1].message_center = g_strdup("http://mms.example.com:8000"); + + return 0; } static struct ofono_gprs_provision_driver example_driver = { |