diff options
author | Paul Kocialkowski <contact@paulk.fr> | 2013-06-26 12:22:52 +0200 |
---|---|---|
committer | Paul Kocialkowski <contact@paulk.fr> | 2013-06-26 12:22:52 +0200 |
commit | b63737e8e43cc294118c3fef034091193a4ce110 (patch) | |
tree | c03cb053928af8943be1587e68bf9d881a549cc6 /samsung-ipc | |
parent | 94826c5d6f1a52d96468cce0c8605075d2a1a9a3 (diff) | |
download | external_libsamsung-ipc-b63737e8e43cc294118c3fef034091193a4ce110.zip external_libsamsung-ipc-b63737e8e43cc294118c3fef034091193a4ce110.tar.gz external_libsamsung-ipc-b63737e8e43cc294118c3fef034091193a4ce110.tar.bz2 |
ipc_client_send: Single function with return code
Change-Id: I480b2496dabfada37e1ce60ab20401adf02b2e01
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Diffstat (limited to 'samsung-ipc')
-rw-r--r-- | samsung-ipc/ipc.c | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/samsung-ipc/ipc.c b/samsung-ipc/ipc.c index 4b03ea1..c1da5a4 100644 --- a/samsung-ipc/ipc.c +++ b/samsung-ipc/ipc.c @@ -447,33 +447,16 @@ int ipc_client_gprs_get_capabilities(struct ipc_client *client, struct ipc_clien return client->gprs_specs->gprs_get_capabilities(cap); } -int _ipc_client_send(struct ipc_client *client, struct ipc_message_info *request) +int ipc_client_send(struct ipc_client *client, const unsigned short command, + const char type, unsigned char *data, const int length, unsigned char mseq) { + struct ipc_message_info request; + if (client == NULL || client->ops == NULL || client->ops->send == NULL) return -1; - return client->ops->send(client, request); -} - -inline void ipc_client_send_get(struct ipc_client *client, - const unsigned short command, unsigned char mseq) -{ - ipc_client_send(client, command, IPC_TYPE_GET, 0, 0, mseq); -} - -inline void ipc_client_send_exec(struct ipc_client *client, - const unsigned short command, unsigned char mseq) -{ - ipc_client_send(client, command, IPC_TYPE_EXEC, 0, 0, mseq); -} - -void ipc_client_send(struct ipc_client *client, const unsigned short command, - const char type, unsigned char *data, const int length, unsigned char mseq) -{ - struct ipc_message_info request; - request.mseq = mseq; request.aseq = 0xff; request.group = IPC_GROUP(command); @@ -482,7 +465,7 @@ void ipc_client_send(struct ipc_client *client, const unsigned short command, request.length = length; request.data = data; - _ipc_client_send(client, &request); + return client->ops->send(client, &request); } int ipc_client_recv(struct ipc_client *client, |