Commit 55de54d4 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

macosx: Make sure we cancel the crashLogURLConnection at exit.

parent 9c2f4cb9
...@@ -320,6 +320,8 @@ struct intf_sys_t ...@@ -320,6 +320,8 @@ struct intf_sys_t
/* The timer that update the interface */ /* The timer that update the interface */
NSTimer * interfaceTimer; NSTimer * interfaceTimer;
NSURLConnection * crashLogURLConnection;
AppleRemote * o_remote; 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 */ BOOL b_remote_button_hold; /* true as long as the user holds the left,right,plus or minus on the remote control */
} }
......
...@@ -1871,6 +1871,9 @@ end: ...@@ -1871,6 +1871,9 @@ end:
if( nib_wizard_loaded ) if( nib_wizard_loaded )
[o_wizard release]; [o_wizard release];
[crashLogURLConnection cancel];
[crashLogURLConnection release];
[o_embedded_list release]; [o_embedded_list release];
[o_interaction_list release]; [o_interaction_list release];
[o_eyetv release]; [o_eyetv release];
...@@ -2127,7 +2130,7 @@ end: ...@@ -2127,7 +2130,7 @@ end:
[req setHTTPBody:[postBody dataUsingEncoding:NSUTF8StringEncoding]]; [req setHTTPBody:[postBody dataUsingEncoding:NSUTF8StringEncoding]];
/* Released from delegate */ /* Released from delegate */
NSURLConnection *theConnection = [[NSURLConnection alloc] initWithRequest:req delegate:self]; crashLogURLConnection = [[NSURLConnection alloc] initWithRequest:req delegate:self];
} }
- (void)connectionDidFinishLoading:(NSURLConnection *)connection - (void)connectionDidFinishLoading:(NSURLConnection *)connection
...@@ -2135,13 +2138,15 @@ end: ...@@ -2135,13 +2138,15 @@ end:
NSRunInformationalAlertPanel(_NS("Crash Report successfully sent"), NSRunInformationalAlertPanel(_NS("Crash Report successfully sent"),
_NS("Thanks for your report!"), _NS("Thanks for your report!"),
_NS("OK"), nil, nil, nil); _NS("OK"), nil, nil, nil);
[connection release]; [crashLogURLConnection release];
crashLogURLConnection = nil;
} }
- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error - (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
{ {
NSRunCriticalAlertPanel(_NS("Error when sending the Crash Report"), [error localizedDescription], @"OK", nil, nil); NSRunCriticalAlertPanel(_NS("Error when sending the Crash Report"), [error localizedDescription], @"OK", nil, nil);
[connection release]; [crashLogURLConnection release];
crashLogURLConnection = nil;
} }
- (NSString *)latestCrashLogPathPreviouslySeen:(BOOL)previouslySeen - (NSString *)latestCrashLogPathPreviouslySeen:(BOOL)previouslySeen
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment