| 155 | } |
| 156 | |
| 157 | static u16 get_param(const char *name, char *value, const char *url, u16 max_size) |
| 158 | { |
| 159 | if(!name || !value || !url || !max_size) return 0; |
| 160 | |
| 161 | u8 name_len = strlen(name); |
| 162 | |
| 163 | if(name_len) |
| 164 | { |
| 165 | char *pos = strstr(url, name); |
| 166 | if(pos) |
| 167 | { |
| 168 | if(name[name_len - 1] != '=') name_len++; |
| 169 | return get_value(value, pos + name_len, max_size); |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | *value = '\0'; |
| 174 | return 0; |
| 175 | } |
| 176 | |
| 177 | static s64 get_valuen64(const char *param, const char *label) |
| 178 | { |
no test coverage detected