mesh: Fix string of public-oob and static-oob
A message that is not in the archive (sent off-list or not yet received): CGME20191203100133epcas5p1bf4b021f6cabcba3b5ff67965ccfec56@epcas5p1.samsung.com
PATCH 1/1 mesh: Fix string of public-oob and static-oob
From: Prathyusha N <[email protected]>
Fix string typo as per mesh-api.txt
--- mesh/agent.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
mesh/agent.c +2 -2
@@ -131,9 +131,9 @@ static void parse_prov_caps(struct mesh_agent_prov_caps *caps,break ; } -if (!strcmp (str,"PublicOOB" )) +if (!strcmp (str,"public-oob" )) caps->pub_type =1 ; -else if (!strcmp (str,"StaticOOB" )) +else if (!strcmp (str,"static-oob" )) caps->static_type =1 ; }
Signature · 1 line
2.7.4
PATCH 1/1 mesh: Fix invalid transaction number in PROV_INVITE
From: Prathyusha N <[email protected]>
For initiator, transaction number starts from 0x00 where as for acceptor transaction number starts from 0x80. Since transaction number is pre-incremented and sent in every packet, initialize it with 0xFF for initiator and 0x7F for acceptor.
--- mesh/pb-adv.c | 1 + 1 file changed, 1 insertion(+)
mesh/pb-adv.c +1 -0
@@ -292,6 +292,7 @@ static void pb_adv_packet(void *user_data, const uint8_t *pkt, uint16_t len)/* Only call Open callback once */ if (first) {l_debug ("PB-ADV open confirmed" ); + session->local_trans_num =0xFF ; session->open_cb (session->user_data, pb_adv_tx, session,PB_ADV ); }
Signature · 1 line
2.7.4
Gix, Brian
AppliedRe: [PATCH 1/1] mesh: Fix invalid transaction number in PROV_INVITE
Applied
Quoted 22 lines · Prathyusha Nelluri
From: Prathyusha N <[email protected]>
For initiator, transaction number starts from
0x00where as for acceptor transaction number starts from0x80. Since transaction number is pre-incremented and sent in every packet, initialize it with0xFFfor initiator and0x7Ffor acceptor.--- mesh/pb-adv.c | 1 + 1 file changed, 1 insertion(+)mesh/pb-adv.c +1
-0@@ -292,6 +292,7 @@ static void pb_adv_packet(void *user_data, const uint8_t *pkt, uint16_t len)/* Only call Open callback once */ if (first) {l_debug ("PB-ADV open confirmed" ); + session->local_trans_num =0xFF ; session->open_cb (session->user_data, pb_adv_tx, session,PB_ADV ); }
PATCH 1/1 mesh: Fix to send close indication on timeout
In reply to Prathyusha NelluriFrom: Prathyusha N <[email protected]>
If pb_session is freed in timeout, close indication will not be sent. pb_session is freed in pb_adv_unreg() and hence removed from tx_timeout. Added acceptor_free() in acp_prov_close() to ensure pb_session is freed.
--- mesh/pb-adv.c | 2 -- mesh/prov-acceptor.c | 1 + 2 files changed, 1 insertion(+), 2 deletions(-)
mesh/pb-adv.c +0 -2
@@ -175,8 +175,6 @@ static void tx_timeout(struct l_timeout *timeout, void *user_data)l_info ("TX timeout" ); cb = pb_session->close_cb; user_data = pb_session->user_data; -l_free (pb_session); - pb_session =NULL ;cb (user_data,1 ); }
mesh/prov-acceptor.c +1 -0
@@ -121,6 +121,7 @@ static void acceptor_free(void)static void acp_prov_close (void *user_data,uint8_t reason) {/* TODO: Handle Close */ +acceptor_free (); }static void prov_to (struct l_timeout *timeout,void *user_data)
Signature · 1 line
2.7.4
Gix, Brian
AppliedApplied
Quoted 23 lines · Prathyusha Nelluri
From: Prathyusha N <[email protected]>
Fix string typo as per mesh-api.txt
--- mesh/agent.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)mesh/agent.c +2
-2@@ -131,9 +131,9 @@ static void parse_prov_caps(struct mesh_agent_prov_caps *caps,break ; } -if (!strcmp (str,"PublicOOB" )) +if (!strcmp (str,"public-oob" )) caps->pub_type =1 ; -else if (!strcmp (str,"StaticOOB" )) +else if (!strcmp (str,"static-oob" )) caps->static_type =1 ; }