diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lockdown.c | 14 | ||||
-rw-r--r-- | src/lockdown.h | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/lockdown.c b/src/lockdown.c index 76d063c..6616e72 100644 --- a/src/lockdown.c +++ b/src/lockdown.c @@ -1078,7 +1078,7 @@ lockdownd_error_t lockdownd_gen_pair_cert(gnutls_datum_t public_key, gnutls_datu * * @return an error code (LOCKDOWN_E_SUCCESS on success) */ -lockdownd_error_t lockdownd_start_ssl_session(lockdownd_client_t client, const char *HostID) +lockdownd_error_t lockdownd_start_ssl_session(lockdownd_client_t client, const char *host_id) { plist_t dict = NULL; uint32_t return_me = 0; @@ -1092,7 +1092,7 @@ lockdownd_error_t lockdownd_start_ssl_session(lockdownd_client_t client, const c /* Setup DevicePublicKey request plist */ dict = plist_new_dict(); plist_dict_add_label(dict, client->label); - plist_dict_insert_item(dict,"HostID", plist_new_string(HostID)); + plist_dict_insert_item(dict,"HostID", plist_new_string(host_id)); plist_dict_insert_item(dict,"Request", plist_new_string("StartSession")); ret = lockdownd_send(client, dict); @@ -1115,15 +1115,15 @@ lockdownd_error_t lockdownd_start_ssl_session(lockdownd_client_t client, const c if (!strcmp(error, "InvalidHostID")) { /* hostid is unknown. Pair and try again */ - char *host_id = NULL; - userpref_get_host_id(&host_id); + char *host_id_new = NULL; + userpref_get_host_id(&host_id_new); - if (LOCKDOWN_E_SUCCESS == lockdownd_pair(client, host_id) ) { + if (LOCKDOWN_E_SUCCESS == lockdownd_pair(client, host_id_new) ) { /* start session again */ plist_free(dict); dict = plist_new_dict(); plist_dict_add_label(dict, client->label); - plist_dict_insert_item(dict,"HostID", plist_new_string(HostID)); + plist_dict_insert_item(dict,"HostID", plist_new_string(host_id_new)); plist_dict_insert_item(dict,"Request", plist_new_string("StartSession")); ret = lockdownd_send(client, dict); @@ -1132,7 +1132,7 @@ lockdownd_error_t lockdownd_start_ssl_session(lockdownd_client_t client, const c ret = lockdownd_recv(client, &dict); } - free(host_id); + free(host_id_new); } free(error); } diff --git a/src/lockdown.h b/src/lockdown.h index 6dac391..6e1b843 100644 --- a/src/lockdown.h +++ b/src/lockdown.h @@ -42,7 +42,7 @@ lockdownd_error_t lockdownd_gen_pair_cert(gnutls_datum_t public_key, gnutls_datu gnutls_datum_t * host_cert, gnutls_datum_t * root_cert); /* SSL functions */ -lockdownd_error_t lockdownd_start_ssl_session(lockdownd_client_t client, const char *HostID); +lockdownd_error_t lockdownd_start_ssl_session(lockdownd_client_t client, const char *host_id); ssize_t lockdownd_securead(gnutls_transport_ptr_t transport, char *buffer, size_t length); ssize_t lockdownd_secuwrite(gnutls_transport_ptr_t transport, char *buffer, size_t length); |