[PATCH] fix sequence number bug in w1 host adaptor code

classic Classic list List threaded Threaded
6 messages Options
eni
Reply | Threaded
Open this post in threaded view
|

[PATCH] fix sequence number bug in w1 host adaptor code

eni
owserver hangs some minutes when sequence number run over 0xFFFF
Signed-off: "Enrico Hoepfner <[hidden email]"


---

  module/owlib/src/c/ow_w1_parse.c | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/module/owlib/src/c/ow_w1_parse.c
b/module/owlib/src/c/ow_w1_parse.c

index 3fd2e8f..611d3dc 100644

--- a/module/owlib/src/c/ow_w1_parse.c

+++ b/module/owlib/src/c/ow_w1_parse.c

@@ -232,7 +232,7 @@ enum Netlink_Read_Status W1_Process_Response( void
(* nrs_callback)( struct netl

                         // Don't need to free since nlm not set if BAD

                         return nrs_error ;

                 }

-               if ( NL_SEQ(nlp.nlm->nlmsg_seq) != (unsigned int) seq ) {

+               if ( NL_SEQ(nlp.nlm->nlmsg_seq) != NL_SEQ(seq) ) {

                         LEVEL_DEBUG("Netlink sequence number out of
order");

                         owfree(nlp.nlm) ;

                         continue ;

--

1.9.1
 

Signed-off: "Enrico Hoepfner <[hidden email]"

 


------------------------------------------------------------------------------
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] fix sequence number bug in w1 host adaptor code

Jan Kandziora
Am 17.11.2016 um 19:05 schrieb Enrico Hoepfner:

> owserver hangs some minutes when sequence number run over 0xFFFF
> Signed-off: "Enrico Hoepfner <[hidden email]"
>
>
> ---
>
>   module/owlib/src/c/ow_w1_parse.c | 2 +-
>
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
>
>
> diff --git a/module/owlib/src/c/ow_w1_parse.c
> b/module/owlib/src/c/ow_w1_parse.c
>
> index 3fd2e8f..611d3dc 100644
>
> --- a/module/owlib/src/c/ow_w1_parse.c
>
> +++ b/module/owlib/src/c/ow_w1_parse.c
>
> @@ -232,7 +232,7 @@ enum Netlink_Read_Status W1_Process_Response( void
> (* nrs_callback)( struct netl
>
>                          // Don't need to free since nlm not set if BAD
>
>                          return nrs_error ;
>
>                  }
>
> -               if ( NL_SEQ(nlp.nlm->nlmsg_seq) != (unsigned int) seq ) {
>
> +               if ( NL_SEQ(nlp.nlm->nlmsg_seq) != NL_SEQ(seq) ) {
>
>                          LEVEL_DEBUG("Netlink sequence number out of
> order");
>
>                          owfree(nlp.nlm) ;
>
>                          continue ;
>
And you have to fix your Email client so it doesn't insert arbitrary
line breaks. E.g in Thunderbird, that's done with Ctrl+Shift+W.

Kind regards

        Jan



------------------------------------------------------------------------------
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
eni
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] fix sequence number bug in w1 host adaptor code

eni
Hi Jan,

  Thank you for the help and thepatience!

owserver hangs some minutes when sequence number run over 0xFFFF
Signed-off: "Enrico Hoepfner <[hidden email]"


---
  module/owlib/src/c/ow_w1_parse.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/module/owlib/src/c/ow_w1_parse.c
b/module/owlib/src/c/ow_w1_parse.c
index 3fd2e8f..611d3dc 100644
--- a/module/owlib/src/c/ow_w1_parse.c
+++ b/module/owlib/src/c/ow_w1_parse.c
@@ -232,7 +232,7 @@ enum Netlink_Read_Status W1_Process_Response( void
(* nrs_callback)( struct netl
                         // Don't need to free since nlm not set if BAD
                         return nrs_error ;
                 }
-               if ( NL_SEQ(nlp.nlm->nlmsg_seq) != (unsigned int) seq ) {
+               if ( NL_SEQ(nlp.nlm->nlmsg_seq) != NL_SEQ(seq) ) {
                         LEVEL_DEBUG("Netlink sequence number out of
order");
                         owfree(nlp.nlm) ;
                         continue ;
--
1.9.1

On 17.11.2016 19:37, Jan Kandziora wrote:

> Am 17.11.2016 um 19:05 schrieb Enrico Hoepfner:
>> owserver hangs some minutes when sequence number run over 0xFFFF
>> Signed-off: "Enrico Hoepfner <[hidden email]"
>>
>>
>> ---
>>
>>    module/owlib/src/c/ow_w1_parse.c | 2 +-
>>
>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>
>>
>>
>> diff --git a/module/owlib/src/c/ow_w1_parse.c
>> b/module/owlib/src/c/ow_w1_parse.c
>>
>> index 3fd2e8f..611d3dc 100644
>>
>> --- a/module/owlib/src/c/ow_w1_parse.c
>>
>> +++ b/module/owlib/src/c/ow_w1_parse.c
>>
>> @@ -232,7 +232,7 @@ enum Netlink_Read_Status W1_Process_Response( void
>> (* nrs_callback)( struct netl
>>
>>                           // Don't need to free since nlm not set if BAD
>>
>>                           return nrs_error ;
>>
>>                   }
>>
>> -               if ( NL_SEQ(nlp.nlm->nlmsg_seq) != (unsigned int) seq ) {
>>
>> +               if ( NL_SEQ(nlp.nlm->nlmsg_seq) != NL_SEQ(seq) ) {
>>
>>                           LEVEL_DEBUG("Netlink sequence number out of
>> order");
>>
>>                           owfree(nlp.nlm) ;
>>
>>                           continue ;
>>
> And you have to fix your Email client so it doesn't insert arbitrary
> line breaks. E.g in Thunderbird, that's done with Ctrl+Shift+W.
>
> Kind regards
>
> Jan
>
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Owfs-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers


------------------------------------------------------------------------------
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] fix sequence number bug in w1 host adaptor code

Jan Kandziora
Am 17.11.2016 um 21:15 schrieb Enrico Hoepfner:

> Hi Jan,
>
>   Thank you for the help and thepatience!
>
> owserver hangs some minutes when sequence number run over 0xFFFF
> Signed-off: "Enrico Hoepfner <[hidden email]"
>
>
> ---
>   module/owlib/src/c/ow_w1_parse.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/module/owlib/src/c/ow_w1_parse.c
> b/module/owlib/src/c/ow_w1_parse.c
> index 3fd2e8f..611d3dc 100644
> --- a/module/owlib/src/c/ow_w1_parse.c
> +++ b/module/owlib/src/c/ow_w1_parse.c
> @@ -232,7 +232,7 @@ enum Netlink_Read_Status W1_Process_Response( void
> (* nrs_callback)( struct netl
>                          // Don't need to free since nlm not set if BAD
>                          return nrs_error ;
>                  }
> -               if ( NL_SEQ(nlp.nlm->nlmsg_seq) != (unsigned int) seq ) {
> +               if ( NL_SEQ(nlp.nlm->nlmsg_seq) != NL_SEQ(seq) ) {
>                          LEVEL_DEBUG("Netlink sequence number out of
> order");
>                          owfree(nlp.nlm) ;
>                          continue ;
>
Still borken. *sob*

Anyway, I will fix and apply it.

Kind regards

        Jan



------------------------------------------------------------------------------
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
eni
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] fix sequence number bug in w1 host adaptor code

eni
Hi Jan,

  sorry for that - in my sent-folder looks the message ok.

owserver hangs some minutes when sequence number run over 0xFFFF
Signed-off: "Enrico Hoepfner <[hidden email]"


---
  module/owlib/src/c/ow_w1_parse.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/module/owlib/src/c/ow_w1_parse.c
b/module/owlib/src/c/ow_w1_parse.c
index 3fd2e8f..611d3dc 100644
--- a/module/owlib/src/c/ow_w1_parse.c
+++ b/module/owlib/src/c/ow_w1_parse.c
@@ -232,7 +232,7 @@ enum Netlink_Read_Status W1_Process_Response( void
(* nrs_callback)( struct netl
                         // Don't need to free since nlm not set if BAD
                         return nrs_error ;
                 }
-               if ( NL_SEQ(nlp.nlm->nlmsg_seq) != (unsigned int) seq ) {
+               if ( NL_SEQ(nlp.nlm->nlmsg_seq) != NL_SEQ(seq) ) {
                         LEVEL_DEBUG("Netlink sequence number out of
order");
                         owfree(nlp.nlm) ;
                         continue ;
--
1.9.1


On 18.11.2016 00:24, Jan Kandziora wrote:

> Am 17.11.2016 um 21:15 schrieb Enrico Hoepfner:
>> Hi Jan,
>>
>>    Thank you for the help and thepatience!
>>
>> owserver hangs some minutes when sequence number run over 0xFFFF
>> Signed-off: "Enrico Hoepfner <[hidden email]"
>>
>>
>> ---
>>    module/owlib/src/c/ow_w1_parse.c | 2 +-
>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/module/owlib/src/c/ow_w1_parse.c
>> b/module/owlib/src/c/ow_w1_parse.c
>> index 3fd2e8f..611d3dc 100644
>> --- a/module/owlib/src/c/ow_w1_parse.c
>> +++ b/module/owlib/src/c/ow_w1_parse.c
>> @@ -232,7 +232,7 @@ enum Netlink_Read_Status W1_Process_Response( void
>> (* nrs_callback)( struct netl
>>                           // Don't need to free since nlm not set if BAD
>>                           return nrs_error ;
>>                   }
>> -               if ( NL_SEQ(nlp.nlm->nlmsg_seq) != (unsigned int) seq ) {
>> +               if ( NL_SEQ(nlp.nlm->nlmsg_seq) != NL_SEQ(seq) ) {
>>                           LEVEL_DEBUG("Netlink sequence number out of
>> order");
>>                           owfree(nlp.nlm) ;
>>                           continue ;
>>
> Still borken. *sob*
>
> Anyway, I will fix and apply it.
>
> Kind regards
>
> Jan
>
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Owfs-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers


------------------------------------------------------------------------------
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] fix sequence number bug in w1 host adaptor code

Johan Ström-3
In reply to this post by Jan Kandziora
On 18/11/16 00:24, Jan Kandziora wrote:

> Am 17.11.2016 um 21:15 schrieb Enrico Hoepfner:
>> Hi Jan,
>> ....
>>                  }
>> -               if ( NL_SEQ(nlp.nlm->nlmsg_seq) != (unsigned int) seq ) {
>> +               if ( NL_SEQ(nlp.nlm->nlmsg_seq) != NL_SEQ(seq) ) {
>>                          LEVEL_DEBUG("Netlink sequence number out of
>> order");
>> ...
>>
> Still borken. *sob*
>
> Anyway, I will fix and apply it.

Gee, if there only was a way to handle patches in a simpler way... Oh, I
know.. Github Pull requests! ;) (https://github.com/owfs/owfs/pulls, not
yet open for business though)

I haven't gotten any further responses from Paul since 28th of July
where he said (on the list) "I'm sorta gone. How can I help the
transition?"..

Should we go on without his blessing?

Johan

------------------------------------------------------------------------------
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers