Browse Source

dialog: fixed DLG_FLAG_CHANGED_PROF value and setting DLG_FLAG_DEL

- GH #4151
Dennis Yurasov 6 tháng trước cách đây
mục cha
commit
2b1ca7813c
2 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 1 1
      src/modules/dialog/dlg_hash.h
  2. 2 2
      src/modules/dialog/dlg_var.c

+ 1 - 1
src/modules/dialog/dlg_hash.h

@@ -70,7 +70,7 @@
 
 #define DLG_FLAG_TM (1 << 9)			 /*!< dialog is set in transaction */
 #define DLG_FLAG_EXPIRED (1 << 10)		 /*!< dialog is expired */
-#define DLG_FLAG_CHANGED_PROF (1 << 10)	 /*!< dialog-profiles changed DMQ*/
+#define DLG_FLAG_CHANGED_PROF (1 << 11)	 /*!< dialog-profiles changed - DMQ */
 #define DLG_FLAG_DB_LOAD_EXTRA (1 << 12) /*!< dialog loaded extra from db */
 
 /* internal flags stored in db */

+ 2 - 2
src/modules/dialog/dlg_var.c

@@ -197,8 +197,8 @@ int set_dlg_variable_unsafe(struct dlg_cell *dlg, str *key, str *val)
 					it_prev->next = it->next;
 				else
 					*var_list = it->next;
-				/* Set the delete-flag for the current var: */
-				it->vflags &= DLG_FLAG_DEL;
+				/* set the delete-flag for the current var */
+				it->vflags |= DLG_FLAG_DEL;
 			} else {
 				/* replace the current it with var and free the it */
 				var->next = it->next;