Bug in Z-Stack?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Bug in Z-Stack?

1,850件の閲覧回数
Zap
Contributor I
Hi everybody,
 
looking at this lines of code found in ZDApp.c
 
case ZDO_NWK_DISC_CNF:
  if (devState != DEV_NWK_DISC)
  {
  }
#if !defined ( ZDO_COORDINATOR )
  else if ( (msgPtr[1] == ZDO_SUCCESS ) &&
      ( zdoDiscCounter++ > MAX_DISC_ATTEMPTS ) )
  {
    devState = DEV_NWK_JOINING;
    ...
 
I can't understand why  (zdoDiscCounter++>MAX_DISC_ATTEMPTS).
According to me following this code a device or a router won't join the network unless it recive more than MAX_DISC_ATTEMPTS succesful discoveries notifications.
I changed the statement with (zdoDiscCounter++>MAX_DISC_ATTEMPTS) and it worked well.
Is this a bug or there are any reason to justify this choice?
 
Thanks!
ラベル(1)
0 件の賞賛
返信
1 返信

365件の閲覧回数
Zap
Contributor I
sorry, cut&paste error!
 
I meant I use this expression:
 
(zdoDiscCounter++<MAX_DISC_ATTEMPTS)
 
 
0 件の賞賛
返信