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

Function new_sock2list

socket_info.c:618–633  ·  view source on GitHub ↗

adds a new sock_info structure to the corresponding list * return 0 on success, -1 on error */

Source from the content-addressed store, hash-verified

616/* adds a new sock_info structure to the corresponding list
617 * return 0 on success, -1 on error */
618int new_sock2list(struct socket_id *sid, str *orig_name,
619 struct socket_info_full** list)
620{
621 struct socket_info_full* si;
622
623 si = new_sock_info(sid, orig_name);
624 if (si==0){
625 LM_ERR("new_sock_info failed\n");
626 goto error;
627 }
628
629 sock_listadd(list, si);
630 return 0;
631error:
632 return -1;
633}
634
635void push_sock2list(struct socket_info_full *si)
636{

Callers 2

expand_interfaceFunction · 0.85
add_listening_socketFunction · 0.85

Calls 1

new_sock_infoFunction · 0.85

Tested by

no test coverage detected