diff options
| author | 2013-09-19 20:06:31 +0200 | |
|---|---|---|
| committer | 2013-09-19 20:06:31 +0200 | |
| commit | 96ef86cc9b61250e2d8a31ba85155a29db6023da (patch) | |
| tree | 815dce4b2ac94a00b5cedbd1b31b65ecde76ebe3 | |
| parent | cab6533e63e390dccda15391cf3988e4d706a958 (diff) | |
| download | libimobiledevice-96ef86cc9b61250e2d8a31ba85155a29db6023da.tar.gz libimobiledevice-96ef86cc9b61250e2d8a31ba85155a29db6023da.tar.bz2 | |
lockdown: Don't shutdown SSL during StopSession already or device complains
| -rw-r--r-- | src/lockdown.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/lockdown.c b/src/lockdown.c index 26af6a6..a6f0318 100644 --- a/src/lockdown.c +++ b/src/lockdown.c | |||
| @@ -208,11 +208,15 @@ lockdownd_error_t lockdownd_stop_session(lockdownd_client_t client, const char * | |||
| 208 | debug_info("success"); | 208 | debug_info("success"); |
| 209 | ret = LOCKDOWN_E_SUCCESS; | 209 | ret = LOCKDOWN_E_SUCCESS; |
| 210 | } | 210 | } |
| 211 | |||
| 211 | plist_free(dict); | 212 | plist_free(dict); |
| 212 | dict = NULL; | 213 | dict = NULL; |
| 213 | if (client->ssl_enabled) { | 214 | |
| 214 | property_list_service_disable_ssl(client->parent); | 215 | if (client->session_id) { |
| 216 | free(client->session_id); | ||
| 217 | client->session_id = NULL; | ||
| 215 | } | 218 | } |
| 219 | |||
| 216 | return ret; | 220 | return ret; |
| 217 | } | 221 | } |
| 218 | 222 | ||
| @@ -223,10 +227,6 @@ static lockdownd_error_t lockdownd_client_free_simple(lockdownd_client_t client) | |||
| 223 | 227 | ||
| 224 | lockdownd_error_t ret = LOCKDOWN_E_UNKNOWN_ERROR; | 228 | lockdownd_error_t ret = LOCKDOWN_E_UNKNOWN_ERROR; |
| 225 | 229 | ||
| 226 | if (client->session_id) { | ||
| 227 | free(client->session_id); | ||
| 228 | } | ||
| 229 | |||
| 230 | if (client->parent) { | 230 | if (client->parent) { |
| 231 | if (property_list_service_client_free(client->parent) == PROPERTY_LIST_SERVICE_E_SUCCESS) { | 231 | if (property_list_service_client_free(client->parent) == PROPERTY_LIST_SERVICE_E_SUCCESS) { |
| 232 | ret = LOCKDOWN_E_SUCCESS; | 232 | ret = LOCKDOWN_E_SUCCESS; |
| @@ -260,7 +260,6 @@ lockdownd_error_t lockdownd_client_free(lockdownd_client_t client) | |||
| 260 | 260 | ||
| 261 | lockdownd_error_t ret = LOCKDOWN_E_UNKNOWN_ERROR; | 261 | lockdownd_error_t ret = LOCKDOWN_E_UNKNOWN_ERROR; |
| 262 | 262 | ||
| 263 | |||
| 264 | if (client->session_id) { | 263 | if (client->session_id) { |
| 265 | lockdownd_stop_session(client, client->session_id); | 264 | lockdownd_stop_session(client, client->session_id); |
| 266 | } | 265 | } |
