mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-01 17:47:30 +01:00
json_connection: keep pointer to the conn.
This is required for our next hack. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
f4a2c4f8bb
commit
03e7be5bce
2 changed files with 4 additions and 0 deletions
|
@ -621,6 +621,7 @@ static struct io_plan *jcon_connected(struct io_conn *conn,
|
||||||
struct json_connection *jcon;
|
struct json_connection *jcon;
|
||||||
|
|
||||||
jcon = tal(conn, struct json_connection);
|
jcon = tal(conn, struct json_connection);
|
||||||
|
jcon->conn = conn;
|
||||||
jcon->ld = ld;
|
jcon->ld = ld;
|
||||||
jcon->used = 0;
|
jcon->used = 0;
|
||||||
jcon->buffer = tal_arr(jcon, char, 64);
|
jcon->buffer = tal_arr(jcon, char, 64);
|
||||||
|
|
|
@ -50,6 +50,9 @@ struct json_connection {
|
||||||
/* The global state */
|
/* The global state */
|
||||||
struct lightningd *ld;
|
struct lightningd *ld;
|
||||||
|
|
||||||
|
/* This io_conn (and our owner!) */
|
||||||
|
struct io_conn *conn;
|
||||||
|
|
||||||
/* Logging for this json connection. */
|
/* Logging for this json connection. */
|
||||||
struct log *log;
|
struct log *log;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue