#5937: Don't send TR_RPC_TORRENT_ADDED notification if torrent wasn't actually added (patch by xzcvczx)

This commit is contained in:
Mike Gelfand 2015-04-29 19:42:05 +00:00
parent 9674df5c4d
commit 0c01e6e19d
1 changed files with 2 additions and 1 deletions

View File

@ -1625,7 +1625,8 @@ addTorrentImpl (struct tr_rpc_idle_data * data, tr_ctor * ctor)
tr_variantListAddStr (&fields, "name");
tr_variantListAddStr (&fields, "hashString");
addInfo (tor, tr_variantDictAdd (data->args_out, key), &fields);
notify (data->session, TR_RPC_TORRENT_ADDED, tor);
if (result == NULL)
notify (data->session, TR_RPC_TORRENT_ADDED, tor);
tr_variantFree (&fields);
result = NULL;
}