On Sat, 2020-01-11 at 00:47 +0100, Michał Lowas-Rzechonek wrote: > Hi Brian, > > On 01/10, Brian Gix wrote: > > This allows one App using the mesh daemon to provision another. > > This patch contains also some wording cosmetics and other PB-ADV fixes > that don't seem related to the loopback mechanism. > > Could you please split this into a patchset? Sure, I will look at this. > > (...) > > + if (session->loop) > > + loop_adv(session->loop, buf, init_size + 10); > > + else > > + mesh_send_pkt(MESH_IO_TX_COUNT_UNLIMITED, 200, > > + buf, init_size + 10); > > This condition check is repeated throughout the code. I think it would > be clearer to replace mesh_send_pkt usages with something like: Yeah, I can probably do this... One reason I didn't was because of the count/interval differences from packet to packet, but sure I could add a level of nesting there... > > static void pb_adv_send(struct pb_adv_session *session, uint8_t count, > uint16_t interval, void *data, uint16_t len) > { > if (session->loop) { > struct idle_rx *rx = ... > } else { > mesh_send_pkt(count, interval, data, len); > } > } >