int ims_qos_init_counters() { if (counter_register_array("ims_qos", ims_qos_cnt_defs) < 0) goto error; return 0; error: return -1; }
static int mysql_mod_init(void) { #if MYSQL_VERSION_ID >= 40101 my_client_ver = mysql_get_client_version(); if ((my_client_ver >= 50025) || ((my_client_ver >= 40122) && (my_client_ver < 50000))) { if (my_send_to == 0) { my_send_to= DEFAULT_MY_SEND_TO; } if (my_recv_to == 0) { my_recv_to= DEFAULT_MY_RECV_TO; } } else if (my_recv_to || my_send_to) { LOG(L_WARN, "WARNING: mysql send or received timeout set, but " " not supported by the installed mysql client library" " (needed at least 4.1.22 or 5.0.25, but installed %ld)\n", my_client_ver); } #else if (my_recv_to || my_send_to) { LOG(L_WARN, "WARNING: mysql send or received timeout set, but " " not supported by the mysql client library used to compile" " the mysql module (needed at least 4.1.1 but " " compiled against %ld)\n", MYSQL_VERSION_ID); } #endif if (counter_register_array("mysql", mysql_cnt_defs) < 0) goto error; return kam_mysql_mod_init(); error: return -1; }
/** initialize sctp statistics. * Must be called before forking. * @return < 0 on errror, 0 on success. */ int sctp_stats_init() { if (counter_register_array("sctp", sctp_cnt_defs) < 0) goto error; return 0; error: return -1; }
/* counter init function must be called before fork */ static int stat_init(void) { if (counter_register_array("dns", dns_cnt_defs) < 0) goto error; return 0; error: return -1; }