diff options
author | Martin Szulecki | 2013-05-23 15:00:14 +0200 |
---|---|---|
committer | Martin Szulecki | 2013-05-23 15:00:14 +0200 |
commit | b1c41365ef0dbf294b12b691d48d6988e578d66d (patch) | |
tree | 88daf9c8b6ef710f75db3d5330d5b8d8fc976a94 | |
parent | abad8cbf298a09627eda4a53024907cef92aa01f (diff) | |
download | libimobiledevice-b1c41365ef0dbf294b12b691d48d6988e578d66d.tar.gz libimobiledevice-b1c41365ef0dbf294b12b691d48d6988e578d66d.tar.bz2 |
syslog_relay: Remove syslog_relay_send() as the service is read-only
-rw-r--r-- | include/libimobiledevice/syslog_relay.h | 5 | ||||
-rw-r--r-- | src/syslog_relay.c | 31 |
2 files changed, 1 insertions, 35 deletions
diff --git a/include/libimobiledevice/syslog_relay.h b/include/libimobiledevice/syslog_relay.h index 9152d79..7ccfd74 100644 --- a/include/libimobiledevice/syslog_relay.h +++ b/include/libimobiledevice/syslog_relay.h @@ -58,10 +58,7 @@ syslog_relay_error_t syslog_relay_client_free(syslog_relay_client_t client); syslog_relay_error_t syslog_relay_start_capture(syslog_relay_client_t client, syslog_relay_receive_cb_t callback, void* user_data); syslog_relay_error_t syslog_relay_stop_capture(syslog_relay_client_t client); -/* sending */ -syslog_relay_error_t syslog_relay_send(syslog_relay_client_t client, const char *data, uint32_t size, uint32_t *sent); - -/* receiving */ +/* Receiving */ syslog_relay_error_t syslog_relay_receive_with_timeout(syslog_relay_client_t client, char *data, uint32_t size, uint32_t *received, unsigned int timeout); syslog_relay_error_t syslog_relay_receive(syslog_relay_client_t client, char *data, uint32_t size, uint32_t *received); diff --git a/src/syslog_relay.c b/src/syslog_relay.c index 807305b..f1231e1 100644 --- a/src/syslog_relay.c +++ b/src/syslog_relay.c @@ -147,37 +147,6 @@ syslog_relay_error_t syslog_relay_client_free(syslog_relay_client_t client) } /** - * Sends data to the service. - * - * @param client The syslog_relay client - * @param data Data to send - * @param size Size of the data to send - * @param sent Number of bytes sent (can be NULL to ignore) - * - * @return SYSLOG_RELAY_E_SUCCESS on success, - * SYSLOG_RELAY_E_INVALID_ARG when client or plist is NULL - */ -syslog_relay_error_t syslog_relay_send(syslog_relay_client_t client, const char* data, uint32_t size, uint32_t *sent) -{ - syslog_relay_error_t res = SYSLOG_RELAY_E_UNKNOWN_ERROR; - int bytes = 0; - - if (!client || !data || (size == 0)) { - return SYSLOG_RELAY_E_INVALID_ARG; - } - - res = syslog_relay_error(service_send(client->parent, data, size, (uint32_t*)&bytes)); - if (bytes <= 0) { - debug_info("ERROR: sending to device failed."); - } - if (sent) { - *sent = (uint32_t)bytes; - } - - return res; -} - -/** * Receives data from the service. * * @param client The syslog_relay client |