Changeset 6162f8941794fbd2cb1f64bf2e9ccf0ced430e47

Show
Ignore:
Timestamp:
01/13/08 23:43:05 (6 months ago)
Author:
Christophe Mutricy <xtophe@videolan.org>
git-committer:
Christophe Mutricy <xtophe@videolan.org> 1200264185 +0000
git-parent:

[eb90d8346cfbcaeaf085f71c24e95565fd3557fe]

git-author:
Christophe Mutricy <xtophe@videolan.org> 1200264185 +0000
Message:

Fix saving of strings config variables. Patch courtesy of Andrew Zaikin

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • THANKS

    raba3355 r6162f89  
    2222Andre Weber <WeberAndre at gmx d0t de> - Qt4 patches 
    2323Andres Krapf <dae at via.ecp.fr> - FreeBSD port and tests, KDE interface 
     24Andrew Zaikin <andrew dot zaikin at gmail dot com> - Config saving fixes 
    2425Andrey Brilevskiy <director at macwest.ru> - Russian translation 
    2526Andy Lindsay <andy_vl at ananam.com> - fixes in the TS demux 
  • src/config/file.c

    red5205f r6162f89  
    596596 
    597597                config_Write (file, p_item->psz_text, N_("string"), 
    598                               modified, p_item->psz_name, "%s", 
     598                              !modified, p_item->psz_name, "%s", 
    599599                              psz_value ? psz_value : ""); 
    600600 
    601                 if (b_retain) 
    602                     break; 
    603  
    604                 free ((char *)p_item->saved.psz); 
    605                 if( (psz_value && p_item->orig.psz && 
    606                      strcmp( psz_value, p_item->orig.psz )) || 
    607                     !psz_value || !p_item->orig.psz) 
    608                     p_item->saved.psz = strdupnull (psz_value); 
    609                 else 
    610                     p_item->saved.psz = NULL; 
     601                if ( !b_retain ) 
     602                { 
     603 
     604                    free ((char *)p_item->saved.psz); 
     605                    if( (psz_value && p_item->orig.psz && 
     606                         strcmp( psz_value, p_item->orig.psz )) || 
     607                        !psz_value || !p_item->orig.psz) 
     608                        p_item->saved.psz = strdupnull (psz_value); 
     609                    else 
     610                        p_item->saved.psz = NULL; 
     611                } 
    611612            } 
    612613