diff options
author | PaulK <contact@paulk.fr> | 2011-10-27 22:16:51 +0200 |
---|---|---|
committer | Joerie de Gram <j.de.gram@gmail.com> | 2011-10-28 13:53:28 +0200 |
commit | 17e2ec0bbe363a24a3d9a6f4b0128a152f6db31a (patch) | |
tree | a5cc26da0ec298903645685c195335aa93243fb0 /samsung-ipc | |
parent | 5118f7748a7a93d09a4721018b8fc68b98faa9e1 (diff) | |
download | external_libsamsung-ipc-17e2ec0bbe363a24a3d9a6f4b0128a152f6db31a.zip external_libsamsung-ipc-17e2ec0bbe363a24a3d9a6f4b0128a152f6db31a.tar.gz external_libsamsung-ipc-17e2ec0bbe363a24a3d9a6f4b0128a152f6db31a.tar.bz2 |
Corrected Android.mk, crespo_ipc file, some headers and helpers.
Diffstat (limited to 'samsung-ipc')
-rw-r--r-- | samsung-ipc/device/crespo/crespo_ipc.c | 27 | ||||
-rw-r--r-- | samsung-ipc/misc.c | 2 | ||||
-rw-r--r-- | samsung-ipc/sec.c | 2 |
3 files changed, 16 insertions, 15 deletions
diff --git a/samsung-ipc/device/crespo/crespo_ipc.c b/samsung-ipc/device/crespo/crespo_ipc.c index 4cca4c0..8752ae0 100644 --- a/samsung-ipc/device/crespo/crespo_ipc.c +++ b/samsung-ipc/device/crespo/crespo_ipc.c @@ -344,7 +344,7 @@ int wake_unlock(char *lock_name, int size) return rc; } -int crespo_ipc_client_recv(struct ipc_client *client, struct ipc_response *response) +int crespo_ipc_client_recv(struct ipc_client *client, struct ipc_message_info *response) { struct modem_io modem_data; struct ipc_header *resphdr; @@ -354,7 +354,7 @@ int crespo_ipc_client_recv(struct ipc_client *client, struct ipc_response *respo modem_data.data = malloc(MAX_MODEM_DATA_SIZE); modem_data.size = MAX_MODEM_DATA_SIZE; - memset(response, 0, sizeof(struct ipc_response)); + memset(response, 0, sizeof(struct ipc_message_info)); wake_lock("secril_fmt-interface", sizeof("secril_fmt-interface") - 1); // FIXME sizeof("...") is ugly! @@ -380,18 +380,19 @@ int crespo_ipc_client_recv(struct ipc_client *client, struct ipc_response *respo response->mseq = resphdr->mseq; response->aseq = resphdr->aseq; - response->command = IPC_COMMAND(resphdr); + response->group = resphdr->group; + response->index = resphdr->index; response->type = resphdr->type; - response->data_length = modem_data.size - sizeof(struct ipc_header); + response->length = modem_data.size - sizeof(struct ipc_header); response->data = NULL; - ipc_client_log(client, "INFO: crespo_ipc_client_recv: response: group = %d, index = %d, command = %04x", - resphdr->group, resphdr->index, response->command); + ipc_client_log(client, "INFO: crespo_ipc_client_recv: response: group = %d, index = %d", + resphdr->group, resphdr->index); - if(response->data_length > 0) + if(response->length > 0) { - response->data = malloc(response->data_length); - memcpy(response->data, (uint8_t *) modem_data.data + sizeof(struct ipc_header), response->data_length); + response->data = malloc(response->length); + memcpy(response->data, (uint8_t *) modem_data.data + sizeof(struct ipc_header), response->length); } free(modem_data.data); @@ -403,16 +404,16 @@ int crespo_ipc_client_recv(struct ipc_client *client, struct ipc_response *respo int crespo_ipc_open(void *data, unsigned int size, void *io_data) { - int type=*((int *) data); - int fd=-1; + int type = *((int *) data); + int fd = -1; switch(type) { - case IPC_CLIENT_TYPE_CRESPO_FMT: + case IPC_CLIENT_TYPE_FMT: fd = open("/dev/modem_fmt", O_RDWR | O_NDELAY); printf("crespo_ipc_open: opening /dev/modem_fmt\n"); break; - case IPC_CLIENT_TYPE_CRESPO_RFS: + case IPC_CLIENT_TYPE_RFS: fd = open("/dev/modem_rfs", O_RDWR | O_NDELAY); printf("crespo_ipc_open: opening /dev/modem_rfs\n"); break; diff --git a/samsung-ipc/misc.c b/samsung-ipc/misc.c index 609d7b8..c4f27ee 100644 --- a/samsung-ipc/misc.c +++ b/samsung-ipc/misc.c @@ -23,7 +23,7 @@ #define DEFAULT_IMSI_LENGTH 15 -char* ipc_misc_me_imsi_response_get_imsi(struct ipc_response *response) +char* ipc_misc_me_imsi_response_get_imsi(struct ipc_message_info *response) { if (response == NULL || response->data[0] != DEFAULT_IMSI_LENGTH) return NULL; diff --git a/samsung-ipc/sec.c b/samsung-ipc/sec.c index 9cef712..174b842 100644 --- a/samsung-ipc/sec.c +++ b/samsung-ipc/sec.c @@ -43,7 +43,7 @@ void ipc_sec_pin_status_set_setup(struct ipc_sec_pin_status_set *message, } } -char* ipc_sec_rsim_access_response_get_file_data(struct ipc_response *response) +char* ipc_sec_rsim_access_response_get_file_data(struct ipc_message_info *response) { int n = 0; int offset = (int) sizeof(struct ipc_sec_rsim_access_response); |