* mod_init * Called by openser at init time */
| 118 | * Called by openser at init time |
| 119 | */ |
| 120 | static int mod_init(void) |
| 121 | { |
| 122 | int ret = 0; |
| 123 | |
| 124 | siplua_log(L_INFO, "mod_init\n"); |
| 125 | |
| 126 | /* load the SL API */ |
| 127 | if (load_sl_api(&slb)!=0) { |
| 128 | siplua_log(L_CRIT, "can't load SL API\n"); |
| 129 | return -1; |
| 130 | } |
| 131 | |
| 132 | if (sipwatch_create_object()) |
| 133 | { |
| 134 | siplua_log(L_CRIT, "failed to initialized siplua's watch object\n"); |
| 135 | return -1; |
| 136 | } |
| 137 | return ret; |
| 138 | } |
| 139 | |
| 140 | /* |
| 141 | * destroy |
nothing calls this directly
no test coverage detected