Explorar o código

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 %!s(int64=15) %!d(string=hai) anos
pai
achega
3303a5b1f7
Modificáronse 1 ficheiros con 2 adicións e 4 borrados
  1. 2 4
      modules_k/registrar/save.c

+ 2 - 4
modules_k/registrar/save.c

@@ -780,18 +780,16 @@ int save(struct sip_msg* _m, char* _d, char* _cflags)
 			goto error;
 			goto error;
 		ret = (ret==0)?1:ret;
 		ret = (ret==0)?1:ret;
 	}
 	}
-#ifdef STATISTICS
+
 	update_stat(accepted_registrations, 1);
 	update_stat(accepted_registrations, 1);
-#endif
+
 	/* Only send reply upon request, not upon reply */
 	/* Only send reply upon request, not upon reply */
 	if ((route_type == REQUEST_ROUTE) && !is_cflag_set(REG_SAVE_NORPL_FL) && (reg_send_reply(_m) < 0))
 	if ((route_type == REQUEST_ROUTE) && !is_cflag_set(REG_SAVE_NORPL_FL) && (reg_send_reply(_m) < 0))
 		return -1;
 		return -1;
 
 
 	return ret;
 	return ret;
 error:
 error:
-#ifdef STATISTICS
 	update_stat(rejected_registrations, 1);
 	update_stat(rejected_registrations, 1);
-#endif
 	if ((route_type == REQUEST_ROUTE) && !is_cflag_set(REG_SAVE_NORPL_FL) )
 	if ((route_type == REQUEST_ROUTE) && !is_cflag_set(REG_SAVE_NORPL_FL) )
 		reg_send_reply(_m);
 		reg_send_reply(_m);