diff options
author | Denis Kenzior <denkenz@gmail.com> | 2009-10-30 15:54:32 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2009-10-30 15:54:32 -0500 |
commit | 26804de94b655618b9dd7d70ab5d4c3ea8d36bd0 (patch) | |
tree | ccc26dee005441ecd0c13ae86894197c61939699 /src | |
parent | 17696e133b1db65c662c0be85a4b787964c60de6 (diff) | |
download | ofono-26804de94b655618b9dd7d70ab5d4c3ea8d36bd0.tar.bz2 |
Add checking for valid APN format
Diffstat (limited to 'src')
-rw-r--r-- | src/gprs.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -208,6 +208,9 @@ static DBusMessage *pri_set_apn(struct pri_context *ctx, DBusConnection *conn, if (g_str_equal(apn, ctx->context.apn)) return dbus_message_new_method_return(msg); + if (is_valid_apn(apn) == FALSE) + return __ofono_error_invalid_format(msg); + strcpy(ctx->context.apn, apn); g_dbus_send_reply(conn, msg, DBUS_TYPE_INVALID); |