diff options
author | Curl Upstream <curl-library@cool.haxx.se> | 2017-06-14 06:08:56 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-06-14 14:46:35 (GMT) |
commit | 06d6d6c4aee149cd6560b919ef6935ef0867d921 (patch) | |
tree | d62adabf2b4b10030abf4a759b520e5edb6dd517 /lib/tftp.c | |
parent | fd7d521c9d70655618db8232d45e5aaf81700f91 (diff) | |
download | CMake-06d6d6c4aee149cd6560b919ef6935ef0867d921.zip CMake-06d6d6c4aee149cd6560b919ef6935ef0867d921.tar.gz CMake-06d6d6c4aee149cd6560b919ef6935ef0867d921.tar.bz2 |
curl 2017-06-14 (54b636f1)
Code extracted from:
https://github.com/curl/curl.git
at commit 54b636f14546d3fde9f9c67c3b32701d78563161 (curl-7_54_1).
Diffstat (limited to 'lib/tftp.c')
-rw-r--r-- | lib/tftp.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -1119,7 +1119,8 @@ static CURLcode tftp_receive_packet(struct connectdata *conn) } else { /* The event is given by the TFTP packet time */ - state->event = (tftp_event_t)getrpacketevent(&state->rpacket); + unsigned short event = getrpacketevent(&state->rpacket); + state->event = (tftp_event_t)event; switch(state->event) { case TFTP_EVENT_DATA: @@ -1138,9 +1139,12 @@ static CURLcode tftp_receive_packet(struct connectdata *conn) } break; case TFTP_EVENT_ERROR: - state->error = (tftp_error_t)getrpacketblock(&state->rpacket); + { + unsigned short error = getrpacketblock(&state->rpacket); + state->error = (tftp_error_t)error; infof(data, "%s\n", (const char *)state->rpacket.data+4); break; + } case TFTP_EVENT_ACK: break; case TFTP_EVENT_OACK: |