GVariant *g_var;
guint info;
__tethering_h *th = (__tethering_h *)user_data;
- tethering_error_e tethering_error;
+ tethering_error_e tethering_error = TETHERING_ERROR_NONE;
g_var = g_dbus_proxy_call_finish(th->client_bus_proxy, res, &g_error);
if (g_error) {
return;
}
g_variant_get(g_var, "(u)", &info);
- tethering_error = __get_error(info);
+ if (tethering_error == TETHERING_ERROR_NONE)
+ tethering_error = __get_error(info);
g_variant_unref(g_var);
th->settings_reloaded_cb(tethering_error,
fclose(fp);
fclose(fp1);
- if ((strcmp(filepath, ALLOWED_LIST) == 0))
- rename(TEMP_LIST, ALLOWED_LIST);
- else if ((strcmp(filepath, BLOCKED_LIST) == 0))
- rename(TEMP_LIST, BLOCKED_LIST);
+ if ((strcmp(filepath, ALLOWED_LIST) == 0)) {
+ if (rename(TEMP_LIST, ALLOWED_LIST) != 0) {
+ ERR("rename is failed (%s -> %s)", TEMP_LIST, ALLOWED_LIST);
+ return TETHERING_ERROR_OPERATION_FAILED;
+ }
+ } else if ((strcmp(filepath, BLOCKED_LIST) == 0)) {
+ if (rename(TEMP_LIST, BLOCKED_LIST) != 0) {
+ ERR("rename is failed (%s -> %s)", TEMP_LIST, BLOCKED_LIST);
+ return TETHERING_ERROR_OPERATION_FAILED;
+ }
+ }
return TETHERING_ERROR_NONE;
}