dundee: Watch for signals only on DUNDEE_SERVICE
[framework/connectivity/connman.git] / plugins / l2tp.c
index 2dd415a..5a655e6 100644 (file)
@@ -3,7 +3,7 @@
  *  Connection Manager
  *
  *  Copyright (C) 2010  BMW Car IT GmbH. All rights reserved.
- *  Copyright (C) 2011  Intel Corporation. All rights reserved.
+ *  Copyright (C) 2012  Intel Corporation. All rights reserved.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License version 2 as
@@ -249,6 +249,9 @@ static int l2tp_save(struct connman_provider *provider, GKeyFile *keyfile)
                if (strncmp(pppd_options[i].cm_opt, "L2TP.", 5) == 0) {
                        option = connman_provider_get_string(provider,
                                                        pppd_options[i].cm_opt);
+                       if (option == NULL)
+                               continue;
+
                        g_key_file_set_string(keyfile,
                                        connman_provider_get_save_group(provider),
                                        pppd_options[i].cm_opt, option);