Browse code

Merge 506672e523a48985f89e2c35bdab3d024df0a34d into 210da8403463290cdd0abec25473df5a15557b83

Victor Seva authored on 23/11/2021 15:14:44 • GitHub committed on 23/11/2021 15:14:44
Showing 2 changed files
... ...
@@ -2858,16 +2858,21 @@ static void rpc_dlg_stats_active(rpc_t *rpc, void *c)
2858 2858
 {
2859 2859
 	dlg_cell_t *dlg;
2860 2860
 	unsigned int i;
2861
+	int dlg_own = 0;
2861 2862
 	int dlg_starting = 0;
2862 2863
 	int dlg_connecting = 0;
2863 2864
 	int dlg_answering = 0;
2864 2865
 	int dlg_ongoing = 0;
2865 2866
 	void *h;
2866 2867
 
2868
+	if(rpc->scan(c, "*d", &dlg_own) < 1)
2869
+		dlg_own = 0;
2867 2870
 	for( i=0 ; i<d_table->size ; i++ ) {
2868 2871
 		dlg_lock( d_table, &(d_table->entries[i]) );
2869 2872
 
2870 2873
 		for( dlg=d_table->entries[i].first ; dlg ; dlg=dlg->next ) {
2874
+			if(dlg_own != 0 && dlg->bind_addr[0] == NULL)
2875
+				continue;
2871 2876
 			switch(dlg->state) {
2872 2877
 				case DLG_STATE_UNCONFIRMED:
2873 2878
 					dlg_starting++;
... ...
@@ -2801,7 +2801,13 @@ dlg_reset_property("timeout-noreset");
2801 2801
 			(not relying on core stats framework).
2802 2802
 		</para>
2803 2803
 		<para>Name: <emphasis>dlg.stats_active</emphasis></para>
2804
-		<para>Parameters: none.</para>
2804
+		<para>Parameters:</para>
2805
+		<itemizedlist>
2806
+			<listitem><para>
2807
+				<emphasis>local_only</emphasis> (optional) - if not 0 then filter out
2808
+				non local dialogues. No bind_addr info in memory.
2809
+			</para></listitem>
2810
+		</itemizedlist>
2805 2811
 		<para>Returned fields</para>
2806 2812
 		<itemizedlist>
2807 2813
 			<listitem><para>