Display an error message when unable to save the configuration

This commit is contained in:
Pierre Pronchery 2010-08-09 18:07:41 +00:00
parent efb6763219
commit 35b2668dec

View File

@ -2449,13 +2449,15 @@ static char const * _phone_config_get(Phone * phone, char const * section,
/* phone_config_save */ /* phone_config_save */
static int _phone_config_save(Phone * phone) static int _phone_config_save(Phone * phone)
{ {
int ret = 0;
char * filename; char * filename;
if((filename = _phone_config_filename()) == NULL) if((filename = _phone_config_filename()) == NULL)
return -1; /* XXX warn the user */ 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); free(filename);
return 0; return ret;
} }