1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 17:17:31 +00:00

#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

View file

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