diff options
Diffstat (limited to 'src/lockdown.c')
| -rw-r--r-- | src/lockdown.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lockdown.c b/src/lockdown.c index 69ccf34..11b4fe6 100644 --- a/src/lockdown.c +++ b/src/lockdown.c | |||
| @@ -1341,8 +1341,8 @@ lockdownd_error_t lockdownd_start_service(lockdownd_client_t client, const char | |||
| 1341 | userpref_get_host_id(&host_id); | 1341 | userpref_get_host_id(&host_id); |
| 1342 | if (!host_id) | 1342 | if (!host_id) |
| 1343 | return LOCKDOWN_E_INVALID_CONF; | 1343 | return LOCKDOWN_E_INVALID_CONF; |
| 1344 | if (!client->ssl_enabled && !lockdownd_start_ssl_session(client, host_id)) | 1344 | if (!client->session_id) |
| 1345 | return LOCKDOWN_E_SSL_ERROR; | 1345 | return LOCKDOWN_E_NO_RUNNING_SESSION; |
| 1346 | 1346 | ||
| 1347 | plist_t dict = NULL; | 1347 | plist_t dict = NULL; |
| 1348 | uint32_t port_loc = 0; | 1348 | uint32_t port_loc = 0; |
| @@ -1413,6 +1413,9 @@ lockdownd_error_t lockdownd_activate(lockdownd_client_t client, plist_t activati | |||
| 1413 | if (!client) | 1413 | if (!client) |
| 1414 | return LOCKDOWN_E_INVALID_ARG; | 1414 | return LOCKDOWN_E_INVALID_ARG; |
| 1415 | 1415 | ||
| 1416 | if (!client->session_id) | ||
| 1417 | return LOCKDOWN_E_NO_RUNNING_SESSION; | ||
| 1418 | |||
| 1416 | if (!activation_record) | 1419 | if (!activation_record) |
| 1417 | return LOCKDOWN_E_INVALID_ARG; | 1420 | return LOCKDOWN_E_INVALID_ARG; |
| 1418 | 1421 | ||
| @@ -1457,6 +1460,9 @@ lockdownd_error_t lockdownd_deactivate(lockdownd_client_t client) | |||
| 1457 | if (!client) | 1460 | if (!client) |
| 1458 | return LOCKDOWN_E_INVALID_ARG; | 1461 | return LOCKDOWN_E_INVALID_ARG; |
| 1459 | 1462 | ||
| 1463 | if (!client->session_id) | ||
| 1464 | return LOCKDOWN_E_NO_RUNNING_SESSION; | ||
| 1465 | |||
| 1460 | lockdownd_error_t ret = LOCKDOWN_E_UNKNOWN_ERROR; | 1466 | lockdownd_error_t ret = LOCKDOWN_E_UNKNOWN_ERROR; |
| 1461 | 1467 | ||
| 1462 | plist_t dict = plist_new_dict(); | 1468 | plist_t dict = plist_new_dict(); |
