From 35b2668dec4bfa942102553663d264a3e9c2e8f8 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Mon, 9 Aug 2010 18:07:41 +0000 Subject: [PATCH] Display an error message when unable to save the configuration --- src/phone.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/phone.c b/src/phone.c index 5548e53..e2729e6 100644 --- a/src/phone.c +++ b/src/phone.c @@ -2449,13 +2449,15 @@ static char const * _phone_config_get(Phone * phone, char const * section, /* phone_config_save */ static int _phone_config_save(Phone * phone) { + int ret = 0; char * filename; if((filename = _phone_config_filename()) == NULL) return -1; /* XXX warn the user */ - config_save(phone->config, filename); + if(config_save(phone->config, filename) != 0) + ret = -phone_error(phone, error_get(), 1); free(filename); - return 0; + return ret; }