2013-03-14 | Paul Boddie | raw files shortlog changelog graph | Avoid spurious connection event speed changes. | |
test.c (file) |
1.1 --- a/test.c Thu Mar 14 23:26:31 2013 +0000 1.2 +++ b/test.c Thu Mar 14 23:32:30 2013 +0000 1.3 @@ -1052,7 +1052,8 @@ 1.4 1.5 /* Handle device disconnection. */ 1.6 1.7 - else if ((devstate != MAX_DEVSTATE_INIT) && connection_event && !devicechanged()) 1.8 + else if ((devstate != MAX_DEVSTATE_INIT) && (devstate != MAX_DEVSTATE_CONNECTED) 1.9 + && connection_event && !devicechanged()) 1.10 { 1.11 devstate = MAX_DEVSTATE_INIT; 1.12 printf("INIT\n");