enum connman_service_state state;
connman_uint8_t strength;
connman_bool_t favorite;
+ GTimeVal modified;
unsigned int order;
char *name;
char *passphrase;
DBG("target %s", target->identifier);
+ g_get_current_time(&service->modified);
+ __connman_storage_save_service(service);
+
src = g_hash_table_lookup(service_hash, service->identifier);
dst = g_hash_table_lookup(service_hash, target->identifier);
DBG("target %s", target->identifier);
+ g_get_current_time(&service->modified);
+ __connman_storage_save_service(service);
+
return __connman_error_not_implemented(msg);
}
dbus_message_unref(service->pending);
service->pending = NULL;
}
+
+ g_get_current_time(&service->modified);
+ __connman_storage_save_service(service);
}
if (state == CONNMAN_SERVICE_STATE_FAILURE) {
GKeyFile *keyfile;
gchar *pathname, *data = NULL;
gsize length;
- char *str;
+ gchar *str;
DBG("service %p", service);
}
str = g_key_file_get_string(keyfile,
+ service->identifier, "Modified", NULL);
+ if (str != NULL) {
+ g_time_val_from_iso8601(str, &service->modified);
+ g_free(str);
+ }
+
+ str = g_key_file_get_string(keyfile,
service->identifier, "Passphrase", NULL);
if (str != NULL) {
g_free(service->passphrase);
GKeyFile *keyfile;
gchar *pathname, *data = NULL;
gsize length;
+ gchar *str;
DBG("service %p", service);
break;
}
+ str = g_time_val_to_iso8601(&service->modified);
+ if (str != NULL) {
+ g_key_file_set_string(keyfile, service->identifier,
+ "Modified", str);
+ g_free(str);
+ }
+
if (service->passphrase != NULL)
g_key_file_set_string(keyfile, service->identifier,
"Passphrase", service->passphrase);