1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-26 09:37:56 +00:00

(trunk libT) make tr_bencDictMerge() support limited nested merges

This commit is contained in:
Charles Kerr 2008-12-12 02:26:33 +00:00
parent 72b9845a5e
commit 0471e6d765

View file

@ -1355,6 +1355,7 @@ tr_bencMergeDicts( tr_benc * target, const tr_benc * source )
{
int64_t i64;
const char * str;
tr_benc * t;
if( tr_bencGetInt( val, &i64 ) )
{
@ -1366,9 +1367,14 @@ tr_bencMergeDicts( tr_benc * target, const tr_benc * source )
tr_bencDictRemove( target, key );
tr_bencDictAddStr( target, key, str );
}
else if( tr_bencIsDict( val ) && tr_bencDictFindDict( target, key, &t ) )
{
tr_bencMergeDicts( t, val );
}
else
{
tr_err( "tr_bencMergeDicts skipping \"%s\"", key );
tr_dbg( "tr_bencMergeDicts skipping \"%s\"", key );
}
}
}