summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaulK <contact@paulk.fr>2012-01-14 19:35:26 +0100
committerPaulK <contact@paulk.fr>2012-01-14 19:35:26 +0100
commit0497009cbc1ab3bff5406b549ce29333ca8e280e (patch)
treeae7c2724bf455f01a43ccd2c298840a9b1d9e1fe
parent6474d98f858613483ff3fec70dd585047b69a4c4 (diff)
downloadhardware_ril_samsung-ril-0497009cbc1ab3bff5406b549ce29333ca8e280e.zip
hardware_ril_samsung-ril-0497009cbc1ab3bff5406b549ce29333ca8e280e.tar.gz
hardware_ril_samsung-ril-0497009cbc1ab3bff5406b549ce29333ca8e280e.tar.bz2
Changed IPC Client to deal with new handlers common data
-rw-r--r--client.c4
-rw-r--r--ipc.c23
2 files changed, 18 insertions, 9 deletions
diff --git a/client.c b/client.c
index 84cbbd5..12e195c 100644
--- a/client.c
+++ b/client.c
@@ -75,6 +75,8 @@ int ril_client_create(struct ril_client *client)
LOGD("RIL client inners creation failed!");
else
break;
+
+ usleep(500000);
}
if(c == 0) {
@@ -101,6 +103,8 @@ int ril_client_destroy(struct ril_client *client)
LOGD("RIL client inners destroying failed!");
else
break;
+
+ usleep(500000);
}
if(c == 0) {
diff --git a/ipc.c b/ipc.c
index 86f0185..98c902f 100644
--- a/ipc.c
+++ b/ipc.c
@@ -144,15 +144,14 @@ int ipc_fmt_create(struct ril_client *client)
// ipc_client_set_handlers
- LOGD("Passing client->object->ipc_client fd as handlers data");
- rc = ipc_client_set_all_handlers_data(ipc_client, &((struct ipc_client_object *) client->object)->ipc_client_fd);
+ LOGD("Creating handlers common data");
+ rc = ipc_client_create_handlers_common_data(ipc_client);
if(rc < 0) {
- LOGE("ipc_client_fd as handlers data failed!");
+ LOGE("Creating handlers common data failed!");
return -1;
}
-
LOGD("Starting modem bootstrap");
rc = ipc_client_bootstrap_modem(ipc_client);
@@ -167,7 +166,9 @@ int ipc_fmt_create(struct ril_client *client)
return -1;
}
- ipc_client_fd = ((struct ipc_client_object *) client->object)->ipc_client_fd;
+ LOGD("Obtaining ipc_client_fd");
+ ipc_client_fd = ipc_client_get_handlers_common_data_fd(ipc_client);
+ client_object->ipc_client_fd = ipc_client_fd;
if(ipc_client_fd < 0) {
LOGE("%s: client_fmt_fd is negative, aborting", __FUNCTION__);
@@ -211,6 +212,7 @@ int ipc_fmt_destroy(struct ril_client *client)
ipc_client = ((struct ipc_client_object *) client->object)->ipc_client;
if(ipc_client != NULL) {
+ ipc_client_destroy_handlers_common_data(ipc_client);
ipc_client_power_off(ipc_client);
ipc_client_close(ipc_client);
ipc_client_free(ipc_client);
@@ -331,11 +333,11 @@ int ipc_rfs_create(struct ril_client *client)
// ipc_client_set_handlers
- LOGD("Passing client->object->ipc_client fd as handlers data");
- rc = ipc_client_set_all_handlers_data(ipc_client, &((struct ipc_client_object *) client->object)->ipc_client_fd);
+ LOGD("Creating handlers common data");
+ rc = ipc_client_create_handlers_common_data(ipc_client);
if(rc < 0) {
- LOGE("ipc_client_fd as handlers data failed!");
+ LOGE("Creating handlers common data failed!");
return -1;
}
@@ -345,7 +347,9 @@ int ipc_rfs_create(struct ril_client *client)
return -1;
}
- ipc_client_fd = ((struct ipc_client_object *) client->object)->ipc_client_fd;
+ LOGD("Obtaining ipc_client_fd");
+ ipc_client_fd = ipc_client_get_handlers_common_data_fd(ipc_client);
+ client_object->ipc_client_fd = ipc_client_fd;
if(ipc_client_fd < 0) {
LOGE("%s: client_rfs_fd is negative, aborting", __FUNCTION__);
@@ -384,6 +388,7 @@ int ipc_rfs_destroy(struct ril_client *client)
ipc_client = ((struct ipc_client_object *) client->object)->ipc_client;
if(ipc_client != NULL) {
+ ipc_client_destroy_handlers_common_data(ipc_client);
ipc_client_close(ipc_client);
ipc_client_free(ipc_client);
}