! * \brief Allocates and initializes a new routing list holder */
| 100 | * \brief Allocates and initializes a new routing list holder |
| 101 | */ |
| 102 | struct os_script_routes* new_sroutes_holder( int inc_ver ) |
| 103 | { |
| 104 | static unsigned int sr_version = 1; |
| 105 | struct os_script_routes *sr; |
| 106 | |
| 107 | sr = (struct os_script_routes *) pkg_malloc |
| 108 | ( sizeof(struct os_script_routes) ); |
| 109 | if ( sr==NULL) { |
| 110 | LM_ERR("failed to allocate table for script routes\n"); |
| 111 | return NULL; |
| 112 | } |
| 113 | memset( sr, 0, sizeof(struct os_script_routes) ); |
| 114 | |
| 115 | sr->request[DEFAULT_RT].name = "0"; |
| 116 | sr->onreply[DEFAULT_RT].name = "0"; |
| 117 | |
| 118 | sr->version = inc_ver ? ++sr_version : sr_version ; |
| 119 | |
| 120 | return sr; |
| 121 | } |
| 122 | |
| 123 | |
| 124 | /*! |
no outgoing calls
no test coverage detected