Browse code

Modules/registrar : update stats even if -DSTATISTICS was not passed to the compiles(this was the default)

update_stat was called even if the statistics where not added to the stats framework.

Marius Zbihlei authored on 17/02/2010 11:57:05
Showing 1 changed files
... ...
@@ -780,18 +780,16 @@ int save(struct sip_msg* _m, char* _d, char* _cflags)
780 780
 			goto error;
781 781
 		ret = (ret==0)?1:ret;
782 782
 	}
783
-#ifdef STATISTICS
783
+
784 784
 	update_stat(accepted_registrations, 1);
785
-#endif
785
+
786 786
 	/* Only send reply upon request, not upon reply */
787 787
 	if ((route_type == REQUEST_ROUTE) && !is_cflag_set(REG_SAVE_NORPL_FL) && (reg_send_reply(_m) < 0))
788 788
 		return -1;
789 789
 
790 790
 	return ret;
791 791
 error:
792
-#ifdef STATISTICS
793 792
 	update_stat(rejected_registrations, 1);
794
-#endif
795 793
 	if ((route_type == REQUEST_ROUTE) && !is_cflag_set(REG_SAVE_NORPL_FL) )
796 794
 		reg_send_reply(_m);
797 795