summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2009-12-07 18:07:56 +0100
committerGravatar Matt Colyer2009-12-07 19:45:03 -0800
commit213025d04ae8788be393b63e245f2805386f7f8a (patch)
treeb1b5e69754b994aff382896d403d4b205592636e
parent3bb7d9596e9b852b2e13185386cc0b71c952e84d (diff)
downloadlibimobiledevice-213025d04ae8788be393b63e245f2805386f7f8a.tar.gz
libimobiledevice-213025d04ae8788be393b63e245f2805386f7f8a.tar.bz2
fix signature of lockdownd_stop_session
This removes the session_id parameter from lockdownd_stop_session because the session_id is stored in the lockdownd_client_int structure anyway.
-rw-r--r--include/libiphone/lockdown.h2
-rw-r--r--src/lockdown.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/include/libiphone/lockdown.h b/include/libiphone/lockdown.h
index af58190..daa5800 100644
--- a/include/libiphone/lockdown.h
+++ b/include/libiphone/lockdown.h
@@ -60,7 +60,7 @@ lockdownd_error_t lockdownd_get_value(lockdownd_client_t client, const char *dom
lockdownd_error_t lockdownd_set_value(lockdownd_client_t client, const char *domain, const char *key, plist_t value);
lockdownd_error_t lockdownd_remove_value(lockdownd_client_t client, const char *domain, const char *key);
lockdownd_error_t lockdownd_start_service(lockdownd_client_t client, const char *service, int *port);
-lockdownd_error_t lockdownd_stop_session(lockdownd_client_t client, const char *session_id);
+lockdownd_error_t lockdownd_stop_session(lockdownd_client_t client);
lockdownd_error_t lockdownd_send(lockdownd_client_t client, plist_t plist);
lockdownd_error_t lockdownd_recv(lockdownd_client_t client, plist_t *plist);
lockdownd_error_t lockdownd_pair(lockdownd_client_t client, char *uuid, char *host_id);
diff --git a/src/lockdown.c b/src/lockdown.c
index b182706..afca410 100644
--- a/src/lockdown.c
+++ b/src/lockdown.c
@@ -115,7 +115,7 @@ static int lockdown_check_result(plist_t dict, const char *query_match)
*
* @return an error code (LOCKDOWN_E_SUCCESS on success)
*/
-lockdownd_error_t lockdownd_stop_session(lockdownd_client_t client, const char *session_id)
+lockdownd_error_t lockdownd_stop_session(lockdownd_client_t client)
{
if (!client)
return LOCKDOWN_E_INVALID_ARG;
@@ -124,7 +124,7 @@ lockdownd_error_t lockdownd_stop_session(lockdownd_client_t client, const char *
plist_t dict = plist_new_dict();
plist_dict_insert_item(dict,"Request", plist_new_string("StopSession"));
- plist_dict_insert_item(dict,"SessionID", plist_new_string(session_id));
+ plist_dict_insert_item(dict,"SessionID", plist_new_string(client->session_id));
log_dbg_msg(DBGMASK_LOCKDOWND, "%s: called\n", __func__);
@@ -170,7 +170,7 @@ static lockdownd_error_t lockdownd_stop_ssl_session(lockdownd_client_t client)
if (client->in_SSL) {
log_dbg_msg(DBGMASK_LOCKDOWND, "%s: stopping SSL session\n", __func__);
- ret = lockdownd_stop_session(client, client->session_id);
+ ret = lockdownd_stop_session(client);
log_dbg_msg(DBGMASK_LOCKDOWND, "%s: sending SSL close notify\n", __func__);
gnutls_bye(client->ssl_session, GNUTLS_SHUT_RDWR);
}