Check against illegal transfer state.
authorFredrik Tolf <fredrik@dolda2000.com>
Wed, 26 Mar 2014 01:05:08 +0000 (02:05 +0100)
committerFredrik Tolf <fredrik@dolda2000.com>
Wed, 26 Mar 2014 01:05:08 +0000 (02:05 +0100)
daemon/fnet-dc.c

index 98742c6..30b0a24 100644 (file)
@@ -1618,7 +1618,7 @@ static void cmd_direction(struct socket *sk, struct dcpeer *peer, char *cmd, cha
        if(peer->direction == TRNSD_DOWN)
            requestfile(peer);
     } else {
-       if(peer->wcsname == NULL)
+       if((peer->wcsname == NULL) || (peer->transfer != NULL))
        {
            peer->close = 1;
            return;