master/master.c
branchstable-1.5
changeset 2441 a89481754fd5
parent 2434 fa52128477f6
child 2443 2c3ccdde3919
equal deleted inserted replaced
2440:341d9575745d 2441:a89481754fd5
   863         ec_datagram_t *datagram /**< datagram */
   863         ec_datagram_t *datagram /**< datagram */
   864         )
   864         )
   865 {
   865 {
   866     ec_datagram_t *queued_datagram;
   866     ec_datagram_t *queued_datagram;
   867 
   867 
   868     switch (datagram->state) {
       
   869         case EC_DATAGRAM_QUEUED:
       
   870             datagram->skip_count++;
       
   871             EC_MASTER_DBG(master, 1, "Skipping already queued datagram %p.\n",
       
   872                     datagram);
       
   873             break;
       
   874 
       
   875         case EC_DATAGRAM_SENT:
       
   876             datagram->skip_count++;
       
   877             EC_MASTER_DBG(master, 1, "Skipping already sent datagram %p.\n",
       
   878                     datagram);
       
   879             break;
       
   880 
       
   881         default:
       
   882             break;
       
   883     }
       
   884 
       
   885     /* It is possible, that a datagram in the queue is re-initialized with the
   868     /* It is possible, that a datagram in the queue is re-initialized with the
   886      * ec_datagram_<type>() methods and then shall be queued with this method.
   869      * ec_datagram_<type>() methods and then shall be queued with this method.
   887      * In that case, the state is already reset to EC_DATAGRAM_INIT. Check if
   870      * In that case, the state is already reset to EC_DATAGRAM_INIT. Check if
   888      * the datagram is queued to avoid duplicate queuing (which results in an
   871      * the datagram is queued to avoid duplicate queuing (which results in an
   889      * infinite loop!). Set the state to EC_DATAGRAM_QUEUED again, probably
   872      * infinite loop!). Set the state to EC_DATAGRAM_QUEUED again, probably