Browse code

Revert "dialog: add parameter to configure synchronisation of all dialog states to DB"

This reverts commit 37d83a5838a50350563f19387fad455d6a433a02 for now.

It needs more rectoring and some extensions in the DB access layer for this module.

Henning Westerholt authored on 14/06/2020 15:09:25
Showing 3 changed files
... ...
@@ -114,7 +114,6 @@ int dlg_noack_timeout = 60;
114 114
 int dlg_end_timeout = 300;
115 115
 
116 116
 int dlg_enable_dmq = 0;
117
-int dlg_update_all_states = 1;
118 117
 
119 118
 int dlg_event_rt[DLG_EVENTRT_MAX];
120 119
 str dlg_event_callback = STR_NULL;
... ...
@@ -328,7 +327,6 @@ static param_export_t mod_params[]={
328 327
 	{ "h_id_start",            PARAM_INT, &dlg_h_id_start           },
329 328
 	{ "h_id_step",             PARAM_INT, &dlg_h_id_step            },
330 329
 	{ "keep_proxy_rr",         INT_PARAM, &dlg_keep_proxy_rr        },
331
-	{ "update_all_states",     INT_PARAM, &dlg_update_all_states    },
332 330
 	{ 0,0,0 }
333 331
 };
334 332
 
... ...
@@ -81,7 +81,6 @@ static db1_con_t* dialog_db_handle    = 0; /* database connection handle */
81 81
 static db_func_t dialog_dbf;
82 82
 
83 83
 extern int dlg_enable_stats;
84
-extern int dlg_update_all_states;
85 84
 extern int dlg_h_id_start;
86 85
 extern int dlg_h_id_step;
87 86
 
... ...
@@ -816,7 +815,7 @@ int update_dialog_dbinfo_unsafe(struct dlg_cell * cell)
816 815
 			&sflags_column, /*18*/     &toroute_name_column, /*19*/ &req_uri_column, /*20*/
817 816
 			&xdata_column, /*21*/      &iflags_column  /*22*/ };
818 817
 
819
-	if((dlg_update_all_states == 0) && (cell->state<DLG_STATE_EARLY || cell->state==DLG_STATE_DELETED)) {
818
+	if(cell->state<DLG_STATE_EARLY || cell->state==DLG_STATE_DELETED) {
820 819
 		LM_DBG("not storing dlg in db during initial or deleted states\n");
821 820
 		return 0;
822 821
 	}
... ...
@@ -82,8 +82,7 @@
82 82
 			<para><emphasis>5</emphasis> : Deleted dialog</para>
83 83
 		</listitem>
84 84
 	</itemizedlist>
85
-	<para>The early and deleted dialog states are updated in database storage,
86
-	unless deactivated with the <emphasis>update_all_states</emphasis> parameter.
85
+	<para>The early and deleted dialog states are not updated in database storage.
87 86
 	</para>
88 87
 	</section>
89 88
 
... ...
@@ -1641,39 +1640,6 @@ modparam("dialog", "keep_proxy_rr", 1)
1641 1640
 </programlisting>
1642 1641
 		</example>
1643 1642
 	</section>
1644
-
1645
-	<section id="dialog.p.update_all_states">
1646
-		<title><varname>update_all_states</varname> (string)</title>
1647
-		<para>
1648
-			When enabled the dialog modules will also synchronize the
1649
-			early and deleted dialog states to the database. This is
1650
-			useful in failover situations, but of course will generate
1651
-			more load to the database from this module.
1652
-		</para>
1653
-		<para>
1654
-			Valid values are:
1655
-		</para>
1656
-		<itemizedlist>
1657
-			<listitem><para>
1658
-				<emphasis>0</emphasis> - Don't synchronize early and deleted dialogs
1659
-			</para></listitem>
1660
-			<listitem><para>
1661
-				<emphasis>1</emphasis> - Synchronize early and deleted dialogs
1662
-			</para></listitem>
1663
-		</itemizedlist>
1664
-		<emphasis>
1665
-			Default value is <quote>1</quote>.
1666
-		</emphasis>
1667
-		<example>
1668
-		<title>Set <varname>update_all_states</varname> parameter</title>
1669
-		<programlisting format="linespecific">
1670
-...
1671
-modparam("dialog", "update_all_states", 1)
1672
-...
1673
-</programlisting>
1674
-		</example>
1675
-	</section>
1676
-
1677 1643
 	</section>
1678 1644
 
1679 1645
 	<section>