SRS: Use different socket type based on RIL version
authorPaul Kocialkowski <contact@paulk.fr>
Tue, 28 Aug 2012 19:29:03 +0000 (21:29 +0200)
committerPaul Kocialkowski <contact@paulk.fr>
Tue, 28 Aug 2012 19:29:03 +0000 (21:29 +0200)
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
srs.c

diff --git a/srs.c b/srs.c
index 95815a5..71100e9 100644 (file)
--- a/srs.c
+++ b/srs.c
@@ -126,8 +126,11 @@ static int srs_server_open(void)
 
        while(t < 5) {
                unlink(SRS_SOCKET_NAME);
+#if RIL_VERSION >= 6
                server_fd = socket_local_server(SRS_SOCKET_NAME, ANDROID_SOCKET_NAMESPACE_ABSTRACT, SOCK_STREAM);
-
+#else
+               server_fd = socket_local_server(SRS_SOCKET_NAME, ANDROID_SOCKET_NAMESPACE_RESERVED, SOCK_STREAM);
+#endif
                if(server_fd >= 0)
                        break;