Bug 709915 - Change name of RIL socket from rilb2g to rilproxy. r=philikon a=ehsan
authorKyle Machulis <kyle@nonpolynomial.com>
Mon, 12 Dec 2011 12:39:17 -0800
changeset 84099 0e0027468ce0a5d3f36d0846c0c0d6c2f2bf6abd
parent 84098 03cd6329e4f9f5fae04a194327481b2be335a656
child 84100 5d433c640bc62466024f94f2336b3badd794a2d5
push id519
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 00:38:35 +0000
treeherdermozilla-beta@788ea1ef610b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersphilikon, ehsan
bugs709915
milestone11.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 709915 - Change name of RIL socket from rilb2g to rilproxy. r=philikon a=ehsan
ipc/ril/Ril.cpp
--- a/ipc/ril/Ril.cpp
+++ b/ipc/ril/Ril.cpp
@@ -60,16 +60,18 @@
 
 #if defined(MOZ_WIDGET_GONK)
 #include <android/log.h>
 #define LOG(args...)  __android_log_print(ANDROID_LOG_INFO, "Gonk", args)
 #else
 #define LOG(args...)  printf(args);
 #endif
 
+#define RIL_SOCKET_NAME "/dev/socket/rilproxy"
+
 using namespace base;
 using namespace std;
 
 namespace mozilla {
 namespace ipc {
 
 struct RilClient : public RefCounted<RilClient>,
                    public MessageLoopForIO::Watcher
@@ -139,20 +141,20 @@ RilClient::OpenSocket()
 #if defined(MOZ_WIDGET_GONK)
     // Using a network socket to test basic functionality
     // before we see how this works on the phone.
     struct sockaddr_un addr;
     socklen_t alen;
     size_t namelen;
     int err;
     memset(&addr, 0, sizeof(addr));
-    strcpy(addr.sun_path, "/dev/socket/rilb2g");
+    strcpy(addr.sun_path, RIL_SOCKET_NAME);
     addr.sun_family = AF_LOCAL;
     mSocket.mFd = socket(AF_LOCAL, SOCK_STREAM, 0);
-    alen = strlen("/dev/socket/rilb2g") + offsetof(struct sockaddr_un, sun_path) + 1;
+    alen = strlen(RIL_SOCKET_NAME) + offsetof(struct sockaddr_un, sun_path) + 1;
 #else
     struct hostent *hp;
     struct sockaddr_in addr;
     socklen_t alen;
 
     hp = gethostbyname("localhost");
     if (hp == 0) return -1;