gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] /srv/bzr/gnash/trunk r9681: close loadVariables IOChannel


From: Sandro Santilli
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r9681: close loadVariables IOChannel as soon as done with it, prepare to
Date: Thu, 04 Sep 2008 21:25:40 +0200
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 9681
committer: Sandro Santilli <address@hidden>
branch nick: trunk
timestamp: Thu 2008-09-04 21:25:40 +0200
message:
  close loadVariables IOChannel as soon as done with it, prepare to
  debug more CURL haging due to IOCHannel leaks on exit.
modified:
  libbase/curl_adapter.cpp
  libcore/LoadVariablesThread.cpp
  libcore/SWFStream.cpp
    ------------------------------------------------------------
    revno: 9677.1.1
    committer: Sandro Santilli <address@hidden>
    branch nick: mybranch
    timestamp: Thu 2008-09-04 13:14:32 +0200
    message:
      delete IOChannel of LoadVariablesThread as soon as done with it
    modified:
      libcore/LoadVariablesThread.cpp
    ------------------------------------------------------------
    revno: 9677.1.2
    committer: Sandro Santilli <address@hidden>
    branch nick: mybranch
    timestamp: Thu 2008-09-04 13:15:51 +0200
    message:
      print debug lines on CurlStreamFile construction/destruction (seems time 
to optimize a bit lifetime of them)
    modified:
      libbase/curl_adapter.cpp
    ------------------------------------------------------------
    revno: 9677.1.3
    committer: Sandro Santilli <address@hidden>
    branch nick: mybranch
    timestamp: Thu 2008-09-04 13:25:31 +0200
    message:
      avoid logging the trailing null making grepping an hell
    modified:
      libcore/SWFStream.cpp
=== modified file 'libbase/curl_adapter.cpp'
--- a/libbase/curl_adapter.cpp  2008-09-04 03:04:47 +0000
+++ b/libbase/curl_adapter.cpp  2008-09-04 11:15:51 +0000
@@ -838,6 +838,7 @@
 /*public*/
 CurlStreamFile::CurlStreamFile(const std::string& url)
 {
+       log_debug("CurlStreamFile %p created", this);
        init(url);
 
        // CURLMcode ret =
@@ -850,6 +851,7 @@
 /*public*/
 CurlStreamFile::CurlStreamFile(const std::string& url, const std::string& vars)
 {
+       log_debug("CurlStreamFile %p created", this);
        init(url);
 
        _postdata = vars;
@@ -889,6 +891,7 @@
 /*public*/
 CurlStreamFile::~CurlStreamFile()
 {
+       log_debug("CurlStreamFile %p deleted", this);
        curl_multi_remove_handle(_mhandle, _handle);
        curl_easy_cleanup(_handle);
        curl_multi_cleanup(_mhandle);

=== modified file 'libcore/LoadVariablesThread.cpp'
--- a/libcore/LoadVariablesThread.cpp   2008-08-19 14:39:32 +0000
+++ b/libcore/LoadVariablesThread.cpp   2008-09-04 11:14:32 +0000
@@ -112,7 +112,8 @@
                if ( cancelRequested() )
                {
                        log_debug("Cancelling LoadVariables download 
thread...");
-                       break;
+                       _stream.reset();
+                       return;
                }
        }
 
@@ -131,6 +132,8 @@
                _bytesTotal = _bytesLoaded;
        }
 
+       _stream.reset(); // we don't need the IOChannel anymore
+
        //dispatchLoadEvent();
        setCompleted();
 }

=== modified file 'libcore/SWFStream.cpp'
--- a/libcore/SWFStream.cpp     2008-08-18 23:53:04 +0000
+++ b/libcore/SWFStream.cpp     2008-09-04 11:25:31 +0000
@@ -453,8 +453,8 @@
        if ( last < len )
        {
                // seems common to find null-terminated lenght-equipped 
strings...
-               log_debug("String %s with length %d has %d trailing NULLs, 
trimming", to, len, len-last);
                to.erase(last);
+               log_debug("String %s with length %d had %d trailing NULLs, 
trimmed", to, len, len-last);
        }
     }
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]