| 1181 | } |
| 1182 | |
| 1183 | static struct command_result *batch_one_complete(struct command *cmd, |
| 1184 | struct request_batch *batch) |
| 1185 | { |
| 1186 | void *arg; |
| 1187 | struct command_result *(*finalcb)(struct command *, void *); |
| 1188 | |
| 1189 | assert(batch->num_remaining); |
| 1190 | |
| 1191 | if (--batch->num_remaining != 0) |
| 1192 | return command_still_pending(cmd); |
| 1193 | |
| 1194 | arg = batch->arg; |
| 1195 | finalcb = batch->finalcb; |
| 1196 | tal_free(batch); |
| 1197 | return finalcb(cmd, arg); |
| 1198 | } |
| 1199 | |
| 1200 | static struct command_result *batch_one_success(struct command *cmd, |
| 1201 | const char *method, |
no test coverage detected