MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / mod_init

Function mod_init

modules/dialog/dialog.c:735–972  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

733
734
735static int mod_init(void)
736{
737 unsigned int n;
738
739 LM_INFO("Dialog module - initializing\n");
740
741 init_db_url( db_url , 1 /*can be null*/);
742 dlg_id_column.len = strlen(dlg_id_column.s);
743 call_id_column.len = strlen(call_id_column.s);
744 from_uri_column.len = strlen(from_uri_column.s);
745 from_tag_column.len = strlen(from_tag_column.s);
746 to_uri_column.len = strlen(to_uri_column.s);
747 to_tag_column.len = strlen(to_tag_column.s);
748 state_column.len = strlen(state_column.s);
749 start_time_column.len = strlen(start_time_column.s);
750 timeout_column.len = strlen(timeout_column.s);
751 to_cseq_column.len = strlen(to_cseq_column.s);
752 from_cseq_column.len = strlen(from_cseq_column.s);
753 to_route_column.len = strlen(to_route_column.s);
754 from_route_column.len = strlen(from_route_column.s);
755 to_contact_column.len = strlen(to_contact_column.s);
756 from_contact_column.len = strlen(from_contact_column.s);
757 to_sock_column.len = strlen(to_sock_column.s);
758 from_sock_column.len = strlen(from_sock_column.s);
759 profiles_column.len = strlen(profiles_column.s);
760 vars_column.len = strlen(vars_column.s);
761 sflags_column.len = strlen(sflags_column.s);
762 mflags_column.len = strlen(mflags_column.s);
763 flags_column.len = strlen(flags_column.s);
764 dialog_table_name.len = strlen(dialog_table_name.s);
765
766 /* param checkings */
767
768 if( log_profile_hash_size <= 0)
769 {
770 LM_ERR("invalid value for log_profile_hash_size:%d!!\n",
771 log_profile_hash_size);
772 return -1;
773 }
774
775 if (rr_param.s==0 || rr_param.s[0]==0) {
776 LM_ERR("empty rr_param!!\n");
777 return -1;
778 }
779 rr_param.len = strlen(rr_param.s);
780 if (rr_param.len>MAX_DLG_RR_PARAM_NAME) {
781 LM_ERR("rr_param too long (max=%d)!!\n", MAX_DLG_RR_PARAM_NAME);
782 return -1;
783 }
784
785 if (default_timeout<=0) {
786 LM_ERR("0 default_timeout not accepted!!\n");
787 return -1;
788 }
789
790
791 if (options_ping_interval<=0 || reinvite_ping_interval<=0) {
792 LM_ERR("Non-positive ping interval not accepted!!\n");

Callers

nothing calls this directly

Calls 15

init_cachedb_utilsFunction · 0.85
context_register_ptrFunction · 0.85
context_register_intFunction · 0.85
state_changed_event_initFunction · 0.85
add_profile_definitionsFunction · 0.85
load_tm_apiFunction · 0.85
load_rr_apiFunction · 0.85
dlg_init_clusteringFunction · 0.85
register_timerFunction · 0.85
init_dlg_handlersFunction · 0.85
init_dlg_timerFunction · 0.85
init_dlg_del_timerFunction · 0.85

Tested by

no test coverage detected