| 169 | } |
| 170 | |
| 171 | static struct command_result *param_recurrence_base(struct command *cmd, |
| 172 | const char *name, |
| 173 | const char *buffer, |
| 174 | const jsmntok_t *tok, |
| 175 | struct tlv_offer_recurrence_base **base) |
| 176 | { |
| 177 | /* Make copy so we can manipulate it */ |
| 178 | jsmntok_t t = *tok; |
| 179 | |
| 180 | *base = tal(cmd, struct tlv_offer_recurrence_base); |
| 181 | if (json_tok_startswith(buffer, &t, "@")) { |
| 182 | t.start++; |
| 183 | (*base)->start_any_period = false; |
| 184 | } else |
| 185 | (*base)->start_any_period = true; |
| 186 | |
| 187 | if (!json_to_u64(buffer, &t, &(*base)->basetime)) |
| 188 | return command_fail_badparam(cmd, name, buffer, tok, |
| 189 | "not a valid basetime or @basetime"); |
| 190 | return NULL; |
| 191 | } |
| 192 | |
| 193 | /* -time+time[%] */ |
| 194 | static struct command_result *param_recurrence_paywindow(struct command *cmd, |
nothing calls this directly
no test coverage detected