]> git.ipfire.org Git - thirdparty/grub.git/commit
Implement flow control for tftp.
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 22 Jun 2012 12:17:46 +0000 (14:17 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 22 Jun 2012 12:17:46 +0000 (14:17 +0200)
commitb27069e06ddcf3ddafcb3fcc765feb71732ca3e6
tree665a244bf57551f5dd9c98929ebb04b9b4ba4ff9
parent6b9cfac6831699cd1ab565e0bf868286d06dd7b1
Implement flow control for tftp.

* grub-core/net/net.c (receive_packets): Decrease the stop to 10
packets but stop only if stop condition is satisfied.
(grub_net_fs_read_real): Call packets_pulled after real read. Use
`stall' instead of `eof' as stop condition.
* grub-core/net/http.c (parse_line): Set `stall' on EOF.
(http_err): Likewise.
* grub-core/net/tftp.c (ack): Replace the first argument with data
instead of socket.
(tftp_receive): Stall if too many packets are in wait queue.
(tftp_packets_pulled): New function.
(grub_tftp_protocol): Set packets_pulled.
* include/grub/net.h (grub_net_packets): New field count.
(grub_net_put_packet): Increment count.
(grub_net_remove_packet): Likewise.
(grub_net_app_protocol): New field `packets_pulled'.
(grub_net): New field `stall'.
ChangeLog
grub-core/net/http.c
grub-core/net/net.c
grub-core/net/tftp.c
include/grub/net.h