Changeset 2573910cf1668288518f1249f04cc61139f1a615

Show
Ignore:
Timestamp:
08/01/08 20:45:05 (1 year ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1199821505 +0000
git-parent:

[0fb33f81f077a7a08bef1c74762e202127120d66]

git-author:
Rémi Denis-Courmont <rem@videolan.org> 1199821505 +0000
Message:

Handle race condition between ABOR answer and other answer when stopping the FTP data connection. Patch by Andrew Zaikin with cosmetic changes.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/access/ftp.c

    r4096b09 r2573910  
    561561        case ACCESS_SET_PRIVATE_ID_STATE: 
    562562        case ACCESS_GET_CONTENT_TYPE: 
     563        case ACCESS_GET_META: 
    563564            return VLC_EGENERIC; 
    564565 
    565566        default: 
    566             msg_Warn( p_access, "unimplemented query in control" ); 
     567            msg_Warn( p_access, "unimplemented query in control: %d", i_query); 
    567568            return VLC_EGENERIC; 
    568569 
     
    778779    if( p_sys->fd_data != -1 ) 
    779780    { 
     781        int i_answer; 
     782        ftp_ReadCommand( p_access, p_sys, &i_answer, NULL ); 
     783        if ( i_answer != 227 ) 
     784            /* If answer is from the previous command, 
     785             * rathen that succesful ABOR - read next command */ 
     786            ftp_ReadCommand( p_access, p_sys, NULL, NULL ); 
     787 
    780788        net_Close( p_sys->fd_data ); 
    781789        p_sys->fd_data = -1; 
    782         ftp_ReadCommand( p_access, p_sys, NULL, NULL ); 
    783     } 
    784     ftp_ReadCommand( p_access, p_sys, NULL, NULL ); 
     790    } 
    785791 
    786792    return VLC_SUCCESS;