Skip to content

Commit

Permalink
Switch 'blocking' param.
Browse files Browse the repository at this point in the history
  • Loading branch information
benbjohnson committed Feb 15, 2018
1 parent 60b6d4d commit d5b0122
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion mar/formats/20150701/ftp_pasv_transfer.mar
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ connection(tcp, ftp_pasv_port):
ftp_pasv_transfer end NULL 1

action do_ftp_pasv_transfer:
server fte.send_async("ID3.*", 512)
server fte.send("ID3.*", 512)
2 changes: 1 addition & 1 deletion mar/formats/20150701/ftp_simple_blocking.mar
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ action do_pasv_mode_ok:
server tg.send("ftp_entering_passive")

action do_ftp_get_file_request:
client fte.send_async("get ([a-zA-Z0-9]*).mp3\n", 128)
client fte.send("get ([a-zA-Z0-9]*).mp3\n", 128)

action do_ftp_get_file_response_started:
server io.puts("150 Opening data channel for file transfer\n")
Expand Down
8 changes: 4 additions & 4 deletions mar/mar.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions plugins/fte/send.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ func send(fsm marionette.FSM, args []interface{}, blocking bool) error {
cell = fsm.StreamSet().Dequeue(capacity)
if cell != nil {
break
} else if !blocking {
} else if blocking {
logger.Debug("no cell, sending empty cell")
cell = marionette.NewCell(0, 0, 0, marionette.NORMAL)
break
}

// Wait until new data is available if blocking.
// Wait until new data is available unless blocking.
<-notify
}

Expand Down

0 comments on commit d5b0122

Please sign in to comment.