mirror of
https://github.com/transmission/transmission
synced 2024-12-26 01:27:28 +00:00
(trunk libT) make tr_bencDictMerge() support limited nested merges
This commit is contained in:
parent
72b9845a5e
commit
0471e6d765
1 changed files with 7 additions and 1 deletions
|
@ -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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue