summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Matt Colyer2009-01-13 23:48:39 -0800
committerGravatar Matt Colyer2009-01-13 23:48:39 -0800
commitbced0730e878aefebb53732702d8dd34486697a2 (patch)
tree0c7f846d5f1f68117a37bb8245b27a2db36dbcb3
parentdc165be9172878144da2fba50139748db32d2986 (diff)
downloadlibimobiledevice-bced0730e878aefebb53732702d8dd34486697a2.tar.gz
libimobiledevice-bced0730e878aefebb53732702d8dd34486697a2.tar.bz2
Removed fprintf, use the debug message method.
-rw-r--r--src/AFC.c2
-rw-r--r--src/iphone.c2
-rw-r--r--src/lockdown.c18
3 files changed, 11 insertions, 11 deletions
diff --git a/src/AFC.c b/src/AFC.c
index 6027ed2..cd24cc6 100644
--- a/src/AFC.c
+++ b/src/AFC.c
@@ -228,7 +228,7 @@ static int receive_AFC_data(iphone_afc_client_t client, char **dump_here)
iphone_mux_recv(client->connection, buffer, sizeof(AFCPacket) * 4, &bytes);
if (bytes <= 0) {
free(buffer);
- fprintf(stderr, "Just didn't get enough.\n");
+ log_debug_msg("Just didn't get enough.\n");
*dump_here = NULL;
return -1;
}
diff --git a/src/iphone.c b/src/iphone.c
index 1f68180..457d919 100644
--- a/src/iphone.c
+++ b/src/iphone.c
@@ -151,7 +151,7 @@ static iphone_error_t iphone_get_specific_device(unsigned int bus_n, int dev_n,
// Check for correct version
if (ntohl(version->major) == 1 && ntohl(version->minor) == 0) {
// We're all ready to roll.
- fprintf(stderr, "get_iPhone() success\n");
+ log_debug_msg("get_iPhone() success\n");
free(version);
*device = phone;
return IPHONE_E_SUCCESS;
diff --git a/src/lockdown.c b/src/lockdown.c
index ab168a3..2d85a03 100644
--- a/src/lockdown.c
+++ b/src/lockdown.c
@@ -126,7 +126,7 @@ static void iphone_lckd_stop_session(iphone_lckd_client_t control)
plist = xmlReadMemory(XML_content, bytes, NULL, NULL, 0);
if (!plist) {
- fprintf(stderr, "lockdownd_stop_session(): IPHONE_E_PLIST_ERROR\n");
+ log_debug_msg("lockdownd_stop_session(): IPHONE_E_PLIST_ERROR\n");
return; //IPHONE_E_PLIST_ERROR;
}
dict = xmlDocGetRootElement(plist);
@@ -135,7 +135,7 @@ static void iphone_lckd_stop_session(iphone_lckd_client_t control)
break;
}
if (!dict) {
- fprintf(stderr, "lockdownd_stop_session(): IPHONE_E_DICT_ERROR\n");
+ log_debug_msg("lockdownd_stop_session(): IPHONE_E_DICT_ERROR\n");
return; //IPHONE_E_DICT_ERROR;
}
dictionary = read_dict_element_strings(dict);
@@ -460,7 +460,7 @@ iphone_error_t iphone_lckd_new_client(iphone_device_t device, iphone_lckd_client
iphone_lckd_client_t client_loc = new_lockdownd_client(device);
if (IPHONE_E_SUCCESS != lockdownd_hello(client_loc)) {
- fprintf(stderr, "Hello failed in the lockdownd client.\n");
+ log_debug_msg("Hello failed in the lockdownd client.\n");
ret = IPHONE_E_NOT_ENOUGH_DATA;
}
@@ -468,12 +468,12 @@ iphone_error_t iphone_lckd_new_client(iphone_device_t device, iphone_lckd_client
char *uid = NULL;
ret = lockdownd_get_device_uid(client_loc, &uid);
if (IPHONE_E_SUCCESS != ret) {
- fprintf(stderr, "Device refused to send uid.\n");
+ log_debug_msg("Device refused to send uid.\n");
}
host_id = get_host_id();
if (IPHONE_E_SUCCESS == ret && !host_id) {
- fprintf(stderr, "No HostID found, run libiphone-initconf.\n");
+ log_debug_msg("No HostID found, run libiphone-initconf.\n");
ret = IPHONE_E_INVALID_CONF;
}
@@ -488,7 +488,7 @@ iphone_error_t iphone_lckd_new_client(iphone_device_t device, iphone_lckd_client
ret = lockdownd_start_SSL_session(client_loc, host_id);
if (IPHONE_E_SUCCESS != ret) {
ret = IPHONE_E_SSL_ERROR;
- fprintf(stderr, "SSL Session opening failed.\n");
+ log_debug_msg("SSL Session opening failed.\n");
}
if (host_id) {
@@ -526,7 +526,7 @@ iphone_error_t lockdownd_pair_device(iphone_lckd_client_t control, char *uid, ch
ret = lockdownd_get_device_public_key(control, &public_key_b64);
if (ret != IPHONE_E_SUCCESS) {
- fprintf(stderr, "Device refused to send public key.\n");
+ log_debug_msg("Device refused to send public key.\n");
return ret;
}
@@ -647,7 +647,7 @@ void lockdownd_close(iphone_lckd_client_t control)
plist = xmlReadMemory(XML_content, bytes, NULL, NULL, 0);
if (!plist) {
- fprintf(stderr, "lockdownd_close(): IPHONE_E_PLIST_ERROR\n");
+ log_debug_msg("lockdownd_close(): IPHONE_E_PLIST_ERROR\n");
return; //IPHONE_E_PLIST_ERROR;
}
dict = xmlDocGetRootElement(plist);
@@ -656,7 +656,7 @@ void lockdownd_close(iphone_lckd_client_t control)
break;
}
if (!dict) {
- fprintf(stderr, "lockdownd_close(): IPHONE_E_DICT_ERROR\n");
+ log_debug_msg("lockdownd_close(): IPHONE_E_DICT_ERROR\n");
return; //IPHONE_E_DICT_ERROR;
}
dictionary = read_dict_element_strings(dict);