[vlc-devel] commit: macosx: Make sure we cancel the crashLogURLConnection at exit. ( Pierre d'Herbemont )
git version control
git at videolan.org
Sat Aug 16 00:18:23 CEST 2008
vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Fri Aug 15 21:39:02 2008 +0200| [55de54d44dcdc186e0ed475b8247dff4801d7a17] | committer: Pierre d'Herbemont
macosx: Make sure we cancel the crashLogURLConnection at exit.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=55de54d44dcdc186e0ed475b8247dff4801d7a17
---
modules/gui/macosx/intf.h | 2 ++
modules/gui/macosx/intf.m | 11 ++++++++---
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/modules/gui/macosx/intf.h b/modules/gui/macosx/intf.h
index 4c70725..ded1405 100644
--- a/modules/gui/macosx/intf.h
+++ b/modules/gui/macosx/intf.h
@@ -320,6 +320,8 @@ struct intf_sys_t
/* The timer that update the interface */
NSTimer * interfaceTimer;
+ NSURLConnection * crashLogURLConnection;
+
AppleRemote * o_remote;
BOOL b_remote_button_hold; /* true as long as the user holds the left,right,plus or minus on the remote control */
}
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 7a7ee7d..ca3b0f4 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -1870,6 +1870,9 @@ end:
if( nib_wizard_loaded )
[o_wizard release];
+
+ [crashLogURLConnection cancel];
+ [crashLogURLConnection release];
[o_embedded_list release];
[o_interaction_list release];
@@ -2127,7 +2130,7 @@ end:
[req setHTTPBody:[postBody dataUsingEncoding:NSUTF8StringEncoding]];
/* Released from delegate */
- NSURLConnection *theConnection = [[NSURLConnection alloc] initWithRequest:req delegate:self];
+ crashLogURLConnection = [[NSURLConnection alloc] initWithRequest:req delegate:self];
}
- (void)connectionDidFinishLoading:(NSURLConnection *)connection
@@ -2135,13 +2138,15 @@ end:
NSRunInformationalAlertPanel(_NS("Crash Report successfully sent"),
_NS("Thanks for your report!"),
_NS("OK"), nil, nil, nil);
- [connection release];
+ [crashLogURLConnection release];
+ crashLogURLConnection = nil;
}
- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
{
NSRunCriticalAlertPanel(_NS("Error when sending the Crash Report"), [error localizedDescription], @"OK", nil, nil);
- [connection release];
+ [crashLogURLConnection release];
+ crashLogURLConnection = nil;
}
- (NSString *)latestCrashLogPathPreviouslySeen:(BOOL)previouslySeen
More information about the vlc-devel
mailing list