Ticket #8519: close_write_filetransfer.patch

File close_write_filetransfer.patch, 1.0 KB (added by [R] <ginsu.squirrel@…>, 10 years ago)
  • programs/mythbackend/mainserver.cpp

     
    42094209    else if (command == "DONE")
    42104210    {
    42114211        ft->Stop();
     4212
     4213        /* If this is a write file transfer, re-enable the callbacks.
     4214         * This allows the MythSocket to get properly closed and
     4215         * cleaned up from the fileTransferList. */
     4216        if (ft->isWriteMode())
     4217            ft->getSocket()->setCallbacks(this);
     4218
    42124219        retlist << "ok";
    42134220    }
    42144221    else if (command == "REQUEST_BLOCK")
  • programs/mythbackend/filetransfer.h

     
    3232    MythSocket *getSocket() { return sock; }
    3333
    3434    bool isOpen(void);
     35    bool isWriteMode() { return writemode; }
    3536
    3637    void Stop(void);
    3738