ads.c some fixes for #7: function analyze
 - bad comparison of the state flags.
 - _ADSDump called with wrong data size.