The unified diff between revisions [43bb367e..] and [63fe9cf9..] is displayed below. It can also be downloaded as a raw diff.
This diff has been restricted to the following files: 'src/lsi/vm.c'
# # old_revision [43bb367e69d2a944206fd7f641ce73111e4bb780] # new_revision [63fe9cf91eccf15b977d5be7600ee10a17d08d95] # # patch "src/lsi/vm.c" # from [f74e79e92252eafbcbc81d3ee4ca5e2e3c79f4a9] # to [0d1a3539301653c5f5cad4792072a3f87ee17d29] # ============================================================ --- src/lsi/vm.c f74e79e92252eafbcbc81d3ee4ca5e2e3c79f4a9 +++ src/lsi/vm.c 0d1a3539301653c5f5cad4792072a3f87ee17d29 @@ -464,6 +464,24 @@ int vm_intfn_cmdsocket_read(void) return 1; } +int vm_intfn_cmdsocket_write(void) +{ + int off = stack_get(vm_current, 1); + int len = stack_get(vm_current, 2); + char *buffer = stack_getstr(vm_current, len, 2); + int newoff; + + newoff = cmdsocket_write(buffer, len, off); + stack_poke(vm_current, 1, newoff); + + if (newoff != len) { + vm_queue(vm_current, VM_CMDWRITEQ); + vm_current = NULL; + return 0; + } + return 1; +} + int vm_intfn_beatdetect_read(void) { if (!beatdetect_read()) {