From: Mike Gelfand Date: Wed, 29 Apr 2015 19:42:05 +0000 (+0000) Subject: #5937: Don't send TR_RPC_TORRENT_ADDED notification if torrent wasn't actually added... X-Git-Tag: 2.90~175 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0c01e6e19db2cba93bbdc54688f5703d33f7c869;p=transmission #5937: Don't send TR_RPC_TORRENT_ADDED notification if torrent wasn't actually added (patch by xzcvczx) --- diff --git a/libtransmission/rpcimpl.c b/libtransmission/rpcimpl.c index 3b369fb1b..73668fb55 100644 --- a/libtransmission/rpcimpl.c +++ b/libtransmission/rpcimpl.c @@ -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; }