Ticket #11400: 0001-Make-die-really-die.patch

File 0001-Make-die-really-die.patch, 1.4 KB (added by dcf, 6 years ago)
  • proxy/flashproxy.js

    From f1130682918583cf72156ded56b3e860fd4fc382 Mon Sep 17 00:00:00 2001
    From: David Fifield <david@bamsoftware.com>
    Date: Tue, 20 May 2014 17:28:45 -0700
    Subject: [PATCH 1/2] Make die really die.
    
    die was intended to prevent future network operations. In reality, it
    just changed the color of the badge and waited for the next polling
    interval.
    
    https://trac.torproject.org/projects/tor/ticket/11400
    ---
     proxy/flashproxy.js | 9 +++++++--
     1 file changed, 7 insertions(+), 2 deletions(-)
    
    diff --git a/proxy/flashproxy.js b/proxy/flashproxy.js
    index e50785c..6307158 100644
    a b function FlashProxy() { 
    690690    };
    691691
    692692    /* Cease all network operations and prevent any future ones. */
    693     this.disable = function() {
    694         puts("Disabling.");
     693    this.cease_operation = function() {
    695694        this.start = function() { };
    696695        this.proxy_main = function() { };
    697696        this.make_proxy_pair = function(client_addr, relay_addr) { };
    698697        while (this.proxy_pairs.length > 0)
    699698            this.proxy_pairs.pop().close();
     699    };
     700
     701    this.disable = function() {
     702        puts("Disabling.");
     703        this.cease_operation();
    700704        if (this.badge)
    701705            this.badge.disable();
    702706    };
    703707
    704708    this.die = function() {
    705709        puts("Dying.");
     710        this.cease_operation();
    706711        if (this.badge)
    707712            this.badge.die();
    708713    };