aboutsummaryrefslogtreecommitdiff
path: root/src/User.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-03-13 03:03:11 +0100
committerdec05eba <dec05eba@protonmail.com>2020-08-18 23:25:46 +0200
commitc7740f0e3cbcd9a7233258f22e6168b1cd8853a8 (patch)
tree21292e24cb7c534d27d8a0600a033977312cfffc /src/User.cpp
parent6099ec04bd0d98b9e75f5b55b1215c94ccf20202 (diff)
Fix add data operation not working correctly
Reminder: do not get reference to hash map value... duh Add thread-safe logging (log is in order now!). Store data immediately to database when WE add it instead of waiting for response from remote peers. TODO: Test with multiple peers (not only localhost)
Diffstat (limited to 'src/User.cpp')
-rw-r--r--src/User.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/User.cpp b/src/User.cpp
index e2017ff..4ec93cd 100644
--- a/src/User.cpp
+++ b/src/User.cpp
@@ -7,12 +7,7 @@ namespace odhtdb
{
if(name.size() > 255)
throw UserNameTooLongException(name);
-
- if(group)
- {
- groups.emplace_back(group);
- group->addUser(this);
- }
+ addToGroup(group);
}
void User::addToGroup(Group *group)