summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2018-11-08 21:05:47 +0100
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2018-11-08 21:05:47 +0100
commita0d1713808f0682180fa04492a8ccc14627c0748 (patch)
treedc6c0fb410c287139010bc3fd0fac22995ddeb65 /src/shared
parent2c0a651bbf8b5521157679bf03f12ceddc80aad4 (diff)
Makes roster updates work.
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/struct/shr_db_query.erl7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/shared/struct/shr_db_query.erl b/src/shared/struct/shr_db_query.erl
index 8cd7b8a..af8b080 100644
--- a/src/shared/struct/shr_db_query.erl
+++ b/src/shared/struct/shr_db_query.erl
@@ -148,6 +148,9 @@ apply_set_field (Op, Elem) ->
-spec apply_op_to (db_query_op(), any()) -> any().
apply_op_to (Op, Elem) when is_record(Op, set_field) ->
apply_set_field(Op, Elem);
+apply_op_to (MOp, _Elem) when is_record(MOp, set_val) ->
+ NewVal = MOp#set_val.val,
+ NewVal;
apply_op_to (Op, Elem) when is_record(Op, add_to_field) ->
apply_add_to_field(Op, Elem);
apply_op_to (Op, Elem) when is_record(Op, update_indexed) ->
@@ -167,10 +170,6 @@ apply_master_op_to (MOp, Elem) when is_record(MOp, set_write_perm) ->
NewPerm = MOp#set_write_perm.perm,
shr_db_item:set_write_permission(NewPerm, Elem);
-apply_master_op_to (MOp, Elem) when is_record(MOp, set_val) ->
- NewVal = MOp#set_val.val,
-
- shr_db_item:set_value(NewVal, Elem);
apply_master_op_to (MOp, Elem) ->
OldValue = shr_db_item:get_value(Elem),
NewValue = apply_op_to(MOp, OldValue),