| 148 | } |
| 149 | |
| 150 | static struct command_result *param_recurrence(struct command *cmd, |
| 151 | const char *name, |
| 152 | const char *buffer, |
| 153 | const jsmntok_t *tok, |
| 154 | struct tlv_offer_recurrence |
| 155 | **recurrence) |
| 156 | { |
| 157 | u32 mul; |
| 158 | const struct time_string *ts; |
| 159 | |
| 160 | ts = json_to_time(buffer, tok, &mul); |
| 161 | if (!ts) |
| 162 | return command_fail_badparam(cmd, name, buffer, tok, |
| 163 | "not a valid time"); |
| 164 | |
| 165 | *recurrence = tal(cmd, struct tlv_offer_recurrence); |
| 166 | (*recurrence)->time_unit = ts->unit; |
| 167 | (*recurrence)->period = ts->mul * mul; |
| 168 | return NULL; |
| 169 | } |
| 170 | |
| 171 | static struct command_result *param_recurrence_base(struct command *cmd, |
| 172 | const char *name, |
nothing calls this directly
no test coverage detected