mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
committed by
Christian Decker
parent
381c32af75
commit
428da65fb1
@@ -15,7 +15,9 @@
|
|||||||
* with a specific error code, and then removed.
|
* with a specific error code, and then removed.
|
||||||
*/
|
*/
|
||||||
#define LIGHTNINGD -1
|
#define LIGHTNINGD -1
|
||||||
#define LIGHTNINGD_INTERNAL -2
|
|
||||||
|
/* Developer error in the parameters to param() call */
|
||||||
|
#define PARAM_DEV_ERROR -2
|
||||||
|
|
||||||
/* Errors from `pay`, `sendpay`, or `waitsendpay` commands */
|
/* Errors from `pay`, `sendpay`, or `waitsendpay` commands */
|
||||||
#define PAY_IN_PROGRESS 200
|
#define PAY_IN_PROGRESS 200
|
||||||
|
|||||||
@@ -284,7 +284,7 @@ static bool param_arr(struct command *cmd, const char *buffer,
|
|||||||
{
|
{
|
||||||
#if DEVELOPER
|
#if DEVELOPER
|
||||||
if (!check_params(params)) {
|
if (!check_params(params)) {
|
||||||
command_fail(cmd, LIGHTNINGD_INTERNAL, "programmer error");
|
command_fail(cmd, PARAM_DEV_ERROR, "programmer error");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -312,8 +312,8 @@ bool param(struct command *cmd, const char *buffer,
|
|||||||
void *arg = va_arg(ap, void *);
|
void *arg = va_arg(ap, void *);
|
||||||
size_t argsize = va_arg(ap, size_t);
|
size_t argsize = va_arg(ap, size_t);
|
||||||
if (!param_add(¶ms, name, required, cb, arg, argsize)) {
|
if (!param_add(¶ms, name, required, cb, arg, argsize)) {
|
||||||
command_fail(cmd, LIGHTNINGD_INTERNAL,
|
command_fail(cmd, PARAM_DEV_ERROR, "programmer error");
|
||||||
"programmer error");
|
va_end(ap);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user