]> granicus.if.org Git - transmission/commitdiff
(trunk daemon) #4440 "transmission-remote --port-test & --blocklist-update fail silen...
authorJordan Lee <jordan@transmissionbt.com>
Wed, 24 Aug 2011 18:50:39 +0000 (18:50 +0000)
committerJordan Lee <jordan@transmissionbt.com>
Wed, 24 Aug 2011 18:50:39 +0000 (18:50 +0000)
daemon/remote.c

index 2c9ea9ce9bb0c2e11b87de2351bdd2ac7546cfaa..0647a6590cc7803e07d8c9346ae42e915a5381ce 100644 (file)
@@ -1644,6 +1644,16 @@ processResponse( const char * rpcurl, const void * response, size_t len )
     {
         int64_t      tag = -1;
         const char * str;
+
+        if(tr_bencDictFindStr(&top, "result", &str))
+        {
+            if( strcmp( str, "success") )
+            {
+                printf( "Error: %s\n", str );
+                status |= EXIT_FAILURE;
+            }
+            else
+            {
         tr_bencDictFindInt( &top, "tag", &tag );
 
         switch( tag )
@@ -1696,6 +1706,10 @@ processResponse( const char * rpcurl, const void * response, size_t len )
 
         tr_bencFree( &top );
     }
+        }
+        else
+            status |= EXIT_FAILURE;
+    }
 
     return status;
 }