]> granicus.if.org Git - transmission/commitdiff
#5937: Don't send TR_RPC_TORRENT_ADDED notification if torrent wasn't actually added...
authorMike Gelfand <mikedld@mikedld.com>
Wed, 29 Apr 2015 19:42:05 +0000 (19:42 +0000)
committerMike Gelfand <mikedld@mikedld.com>
Wed, 29 Apr 2015 19:42:05 +0000 (19:42 +0000)
libtransmission/rpcimpl.c

index 3b369fb1b094b3c0fd474d3dfb10af4079a2f0d7..73668fb559772ace5ce25175624447fce892abfc 100644 (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;
     }