summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2014-07-05 00:36:19 +0200
committerPaul Kocialkowski <contact@paulk.fr>2014-08-07 13:23:30 +0200
commit0931988e014a85d2afab87478c33873d42f3de5f (patch)
tree92ad15a78450ce4add7ab46f576a50161366a11f
parent9774acb7dcd96909a9accd8f2f4452626ea9ba8f (diff)
downloaddevice_samsung_p3100-0931988e014a85d2afab87478c33873d42f3de5f.zip
device_samsung_p3100-0931988e014a85d2afab87478c33873d42f3de5f.tar.gz
device_samsung_p3100-0931988e014a85d2afab87478c33873d42f3de5f.tar.bz2
Audio-RIL-Interface: Keep up with libsrs-clientHEADreplicant-4.2-0004replicant-4.2-0003replicant-4.2
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
-rw-r--r--audio-ril-interface/audio-ril-interface.c32
1 files changed, 17 insertions, 15 deletions
diff --git a/audio-ril-interface/audio-ril-interface.c b/audio-ril-interface/audio-ril-interface.c
index 239335f..6170c63 100644
--- a/audio-ril-interface/audio-ril-interface.c
+++ b/audio-ril-interface/audio-ril-interface.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013 Paul Kocialkowski <contact@paulk.fr>
+ * Copyright (C) 2013-2014 Paul Kocialkowski <contact@paulk.fr>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -31,9 +31,11 @@ void *OpenClient_RILD(void)
ALOGD("%s()", __func__);
- signal(SIGPIPE, SIG_IGN);
-
- srs_client_create(&client);
+ client = srs_client_create();
+ if (client == NULL) {
+ ALOGE("%s: Failed to create SRS client", __func__);
+ return NULL;
+ }
return (void *) client;
}
@@ -56,11 +58,9 @@ int Connect_RILD(void *data)
return RIL_CLIENT_ERR_CONNECT;
}
- rc = srs_client_ping(client);
- if (rc < 0) {
- ALOGE("%s: Failed to ping SRS client", __func__);
- return RIL_CLIENT_ERR_UNKNOWN;
- }
+ rc = srs_ping(client);
+ if (rc < 0)
+ ALOGE("%s: Failed to ping SRS", __func__);
return RIL_CLIENT_ERR_SUCCESS;
}
@@ -98,7 +98,9 @@ int CloseClient_RILD(void *data)
client = (struct srs_client *) data;
- srs_client_destroy(client);
+ rc = srs_client_destroy(client);
+ if (rc < 0)
+ ALOGE("%s: Failed to destroy SRS client", __func__);
return RIL_CLIENT_ERR_SUCCESS;
}
@@ -115,9 +117,9 @@ int isConnected_RILD(void *data)
client = (struct srs_client *) data;
- rc = srs_client_ping(client);
+ rc = srs_ping(client);
if (rc < 0) {
- ALOGE("%s: Failed to ping SRS client", __func__);
+ ALOGE("%s: Failed to ping SRS", __func__);
return 0;
}
@@ -127,7 +129,7 @@ int isConnected_RILD(void *data)
int SetCallVolume(void *data, enum ril_sound_type type, int level)
{
struct srs_client *client;
- struct srs_snd_call_volume call_volume;
+ struct srs_snd_call_volume_data call_volume;
int rc;
ALOGD("%s(%p, %d, %d)", __func__, data, type, level);
@@ -151,7 +153,7 @@ int SetCallVolume(void *data, enum ril_sound_type type, int level)
int SetCallAudioPath(void *data, enum ril_audio_path path)
{
struct srs_client *client;
- struct srs_snd_call_audio_path call_audio_path;
+ struct srs_snd_call_audio_path_data call_audio_path;
int rc;
ALOGD("%s(%p, %d)", __func__, data, path);
@@ -173,7 +175,7 @@ int SetCallAudioPath(void *data, enum ril_audio_path path)
int SetCallClockSync(void *data, enum ril_clock_state condition)
{
struct srs_client *client;
- struct srs_snd_call_clock_sync call_clock_sync;
+ struct srs_snd_call_clock_sync_data call_clock_sync;
int rc;
ALOGD("%s(%p, %d)", __func__, data, condition);