| 160 | } |
| 161 | |
| 162 | static int mod_init(void) |
| 163 | { |
| 164 | fss_table.len = strlen(fss_table.s); |
| 165 | |
| 166 | if (fss_init() != 0) { |
| 167 | LM_ERR("failed to init runtime environment\n"); |
| 168 | return -1; |
| 169 | } |
| 170 | |
| 171 | if (fss_ipc_init() != 0) { |
| 172 | LM_ERR("failed to init IPC\n"); |
| 173 | return -1; |
| 174 | } |
| 175 | |
| 176 | if (fss_evi_init() != 0) { |
| 177 | LM_ERR("failed to init script events\n"); |
| 178 | return -1; |
| 179 | } |
| 180 | |
| 181 | if (fss_db_init() != 0) |
| 182 | LM_ERR("failed to init DB support, running without it\n"); |
| 183 | |
| 184 | if (subscribe_to_fs_urls(&startup_fs_subs) != 0) |
| 185 | LM_ERR("ignored one or more broken FS URL modparams (or oom!)\n"); |
| 186 | |
| 187 | free_shm_str_dlist(&startup_fs_subs); |
| 188 | |
| 189 | fss_db_close(); |
| 190 | |
| 191 | return 0; |
| 192 | } |
| 193 | |
| 194 | static void mod_destroy(void) |
| 195 | { |
nothing calls this directly
no test coverage detected