| 138 | } |
| 139 | |
| 140 | static struct command_result *param_recurrence(struct command *cmd, |
| 141 | const char *name, |
| 142 | const char *buffer, |
| 143 | const jsmntok_t *tok, |
| 144 | struct recurrence **recurrence) |
| 145 | { |
| 146 | u32 mul; |
| 147 | const struct time_string *ts; |
| 148 | |
| 149 | ts = json_to_time(buffer, tok, &mul); |
| 150 | if (!ts) |
| 151 | return command_fail_badparam(cmd, name, buffer, tok, |
| 152 | "not a valid time"); |
| 153 | |
| 154 | *recurrence = tal(cmd, struct recurrence); |
| 155 | (*recurrence)->time_unit = ts->unit; |
| 156 | (*recurrence)->period = ts->mul * mul; |
| 157 | return NULL; |
| 158 | } |
| 159 | |
| 160 | static struct command_result *param_recurrence_base(struct command *cmd, |
| 161 | const char *name, |
nothing calls this directly
no test coverage detected