This commit is contained in:
Quentin 2020-02-05 22:07:39 +01:00
parent 79c633ce5a
commit a6b17cbf74
3 changed files with 6 additions and 1 deletions

View file

@ -271,6 +271,9 @@ int deliver(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo, struct buf
struct algo_ctx* app_ctx = fdinfo->cat->app_ctx; struct algo_ctx* app_ctx = fdinfo->cat->app_ctx;
union abstract_packet* ap = (union abstract_packet*) &bp->ip; union abstract_packet* ap = (union abstract_packet*) &bp->ip;
fprintf(stdout, "QDUDEBUG [lightning.deliver] %s extract port %d\n", fdinfo->url, ap->fmt.content.udp_encapsulated.port);
dump_buffer_packet(bp);
if (ctx->verbose > 1) fprintf(stderr, " [algo_lightning] 1/2 Find destination\n"); if (ctx->verbose > 1) fprintf(stderr, " [algo_lightning] 1/2 Find destination\n");
sprintf(url, "udp:write:127.0.0.1:%d", ap->fmt.content.udp_encapsulated.port); sprintf(url, "udp:write:127.0.0.1:%d", ap->fmt.content.udp_encapsulated.port);
to_fdinfo = evt_core_get_from_url (ctx, url); to_fdinfo = evt_core_get_from_url (ctx, url);

View file

@ -197,6 +197,8 @@ enum FD_STATE read_packet_from_udp (struct evt_core_fdinfo* fdinfo, struct buffe
ap->fmt.headers.size = nread + pkt_header_size; ap->fmt.headers.size = nread + pkt_header_size;
ap->fmt.headers.cmd = CMD_UDP_ENCAPSULATED; ap->fmt.headers.cmd = CMD_UDP_ENCAPSULATED;
ap->fmt.content.udp_encapsulated.port = url_get_port_int (fdinfo->url); ap->fmt.content.udp_encapsulated.port = url_get_port_int (fdinfo->url);
fprintf(stdout, "QDUDEBUG [packet.read_pkt_from_udp] %s extract port %d\n", fdinfo->url, ap->fmt.content.udp_encapsulated.port);
dump_buffer_packet(bp);
bp->mode = BP_WRITING; bp->mode = BP_WRITING;
bp->awrite = 0; bp->awrite = 0;