util/datamanager.lua
changeset 6996 dc0c6b8dc638
parent 6995 0622f2820d1d
child 6997 507301531cf5
equal deleted inserted replaced
6995:0622f2820d1d 6996:dc0c6b8dc638
   232 local function list_append(username, host, datastore, data)
   232 local function list_append(username, host, datastore, data)
   233 	if not data then return; end
   233 	if not data then return; end
   234 	if callback(username, host, datastore) == false then return true; end
   234 	if callback(username, host, datastore) == false then return true; end
   235 	-- save the datastore
   235 	-- save the datastore
   236 
   236 
   237 	local data = "item(" ..  serialize(data) .. ");\n";
   237 	data = "item(" ..  serialize(data) .. ");\n";
   238 	local ok, msg = append(username, host, datastore, "list", data);
   238 	local ok, msg = append(username, host, datastore, "list", data);
   239 	if not ok then
   239 	if not ok then
   240 		log("error", "Unable to write to %s storage ('%s') for user: %s@%s", datastore, msg, username or "nil", host or "nil");
   240 		log("error", "Unable to write to %s storage ('%s') for user: %s@%s", datastore, msg, username or "nil", host or "nil");
   241 		return ok, msg;
   241 		return ok, msg;
   242 	end
   242 	end