| 696 | } |
| 697 | |
| 698 | static void |
| 699 | ng_pptpgre_ack(const hpriv_p hpriv) |
| 700 | { |
| 701 | mtx_assert(&hpriv->mtx, MA_OWNED); |
| 702 | if (!(callout_pending(&hpriv->sackTimer))) { |
| 703 | /* If delayed ACK is disabled, send it now */ |
| 704 | if (!hpriv->conf.enableDelayedAck) { /* ack now */ |
| 705 | ng_pptpgre_xmit(hpriv, NULL); |
| 706 | /* ng_pptpgre_xmit() drops the mutex */ |
| 707 | return; |
| 708 | } |
| 709 | /* ack later */ |
| 710 | ng_pptpgre_start_send_ack_timer(hpriv); |
| 711 | mtx_unlock(&hpriv->mtx); |
| 712 | return; |
| 713 | } |
| 714 | mtx_unlock(&hpriv->mtx); |
| 715 | } |
| 716 | |
| 717 | /* |
| 718 | * Delivers packets from the queue "q" to upper layers. Frees delivered |
no test coverage detected