adds a new sock_info structure to the corresponding list * return 0 on success, -1 on error */
| 616 | /* adds a new sock_info structure to the corresponding list |
| 617 | * return 0 on success, -1 on error */ |
| 618 | int 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; |
| 631 | error: |
| 632 | return -1; |
| 633 | } |
| 634 | |
| 635 | void push_sock2list(struct socket_info_full *si) |
| 636 | { |
no test coverage detected