| 4122 | |
| 4123 | |
| 4124 | static int fix_partition(void** param) |
| 4125 | { |
| 4126 | str *s = (str*)(*param); |
| 4127 | struct head_db *part; |
| 4128 | |
| 4129 | if (s==NULL) { |
| 4130 | /* no partition defined */ |
| 4131 | if (use_partitions==0) { |
| 4132 | if(head_db_start == NULL) { |
| 4133 | LM_ERR("Bad configuration, missing default partition\n"); |
| 4134 | return -1; |
| 4135 | } |
| 4136 | part = head_db_start; |
| 4137 | } else { |
| 4138 | LM_ERR("Partition name is mandatory\n"); |
| 4139 | return -1; |
| 4140 | } |
| 4141 | } else { |
| 4142 | /* partition name defined */ |
| 4143 | if (s->len==1 && s->s[0]=='*') { |
| 4144 | /* partition wild card */ |
| 4145 | part = NULL; |
| 4146 | } else { |
| 4147 | part = get_partition( s ); |
| 4148 | if (part==NULL) { |
| 4149 | LM_ERR("partition <%.*s> used, but not defined\n",s->len,s->s); |
| 4150 | return -1; |
| 4151 | } |
| 4152 | } |
| 4153 | } |
| 4154 | *param = (void*)part; |
| 4155 | |
| 4156 | return 0; |
| 4157 | } |
| 4158 | |
| 4159 | |
| 4160 | static int fix_rule_attr(void** param) |
nothing calls this directly
no test coverage detected