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

Function w_socket_belongs_to_bond

core_cmds.c:1182–1200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1180}
1181
1182static int w_socket_belongs_to_bond(struct sip_msg *msg, str *sock_desc,
1183 struct socket_info *bond_sock)
1184{
1185 const struct socket_info *si;
1186 struct socket_info_ref *bond_ref;
1187
1188 si = parse_sock_info(sock_desc);
1189 if (!si) {
1190 LM_ERR("socket to check [%.*s] does not exist\n",
1191 sock_desc->len,sock_desc->s);
1192 return -1;
1193 }
1194
1195 for (bond_ref = bond_sock->bond_sis; bond_ref; bond_ref = bond_ref->next)
1196 if (bond_ref->si == si)
1197 return 1;
1198
1199 return -1;
1200}
1201
1202static int w_serialize_branches(struct sip_msg *msg, int *clear_prev,
1203 int *keep_ord)

Callers

nothing calls this directly

Calls 1

parse_sock_infoFunction · 0.85

Tested by

no test coverage detected