does not check user. See ENABLE_USER_CHECK in modules/rr/loose.c:is_myself() */ look into the aliases */
| 372 | /* does not check user. See ENABLE_USER_CHECK in modules/rr/loose.c:is_myself() */ |
| 373 | /* look into the aliases */ |
| 374 | static int l_siplua_isMyself(lua_State *L) |
| 375 | { |
| 376 | struct sip_uri puri; |
| 377 | size_t len; |
| 378 | int ret; |
| 379 | |
| 380 | memset(&puri, '\0', sizeof(puri)); |
| 381 | puri.host.s = (char *)luaL_checklstring(L, 1, &len); |
| 382 | puri.host.len = len; |
| 383 | puri.port_no = luaL_checkinteger(L, 2); |
| 384 | set_sip_defaults(puri.port_no, puri.proto); |
| 385 | ret = check_self(&puri.host, puri.port_no, puri.proto); |
| 386 | if (!ret) |
| 387 | lua_pushnil(L); |
| 388 | else |
| 389 | lua_pushboolean(L, 1); |
| 390 | return 1; |
| 391 | } |
| 392 | |
| 393 | /* Similar to isMyself, but without taking a look into the aliases */ |
| 394 | static int l_siplua_grepSockInfo(lua_State *L) |
nothing calls this directly
no test coverage detected