diff options
Diffstat (limited to 'src/heartbeat.c')
| -rw-r--r-- | src/heartbeat.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/heartbeat.c b/src/heartbeat.c index 30fb8af..817c6ad 100644 --- a/src/heartbeat.c +++ b/src/heartbeat.c | |||
| @@ -104,16 +104,18 @@ heartbeat_error_t heartbeat_client_new(idevice_t device, lockdownd_service_descr | |||
| 104 | * @param client Pointer that will point to a newly allocated | 104 | * @param client Pointer that will point to a newly allocated |
| 105 | * heartbeat_client_t upon successful return. Must be freed using | 105 | * heartbeat_client_t upon successful return. Must be freed using |
| 106 | * heartbeat_client_free() after use. | 106 | * heartbeat_client_free() after use. |
| 107 | * @param label The label to use for communication. Usually the program name. | ||
| 108 | * Pass NULL to disable sending the label in requests to lockdownd. | ||
| 107 | * | 109 | * |
| 108 | * @return HEARTBEAT_E_SUCCESS on success, or an HEARTBEAT_E_* error | 110 | * @return HEARTBEAT_E_SUCCESS on success, or an HEARTBEAT_E_* error |
| 109 | * code otherwise. | 111 | * code otherwise. |
| 110 | */ | 112 | */ |
| 111 | heartbeat_error_t heartbeat_client_start_service(idevice_t device, heartbeat_client_t * client) | 113 | heartbeat_error_t heartbeat_client_start_service(idevice_t device, heartbeat_client_t * client, const char* label) |
| 112 | { | 114 | { |
| 113 | *client = NULL; | 115 | *client = NULL; |
| 114 | 116 | ||
| 115 | lockdownd_client_t lckd = NULL; | 117 | lockdownd_client_t lckd = NULL; |
| 116 | if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(device, &lckd, NULL)) { | 118 | if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(device, &lckd, label)) { |
| 117 | idevice_free(device); | 119 | idevice_free(device); |
| 118 | debug_info("Could not create a lockdown client."); | 120 | debug_info("Could not create a lockdown client."); |
| 119 | return HEARTBEAT_E_UNKNOWN_ERROR; | 121 | return HEARTBEAT_E_UNKNOWN_ERROR; |
