mirror of git://git.sysmocom.de/ofono
Add checking for valid APN format
This commit is contained in:
parent
17696e133b
commit
26804de94b
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue