aboutsummaryrefslogtreecommitdiff
path: root/rpc_client_daemon.c
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2016-06-30 21:11:19 -0400
committerRob Austein <sra@hactrn.net>2016-06-30 21:11:19 -0400
commit3ed08b68d4d4bd51d85334aa1a21690737b95cfe (patch)
treec6e96226598704a3b21148c63fee3b81a25eae85 /rpc_client_daemon.c
parent03a407b83da294ff05d4f230437ec06c910b2e85 (diff)
Start work to support client code on Mac OS X.
Includes preliminary support for the magic Mac-specific ioctl() to see line speed, but has not yet been tested, that's waiting for some supporting tweaks to the RPC code from Paul. Includes some general cleanup which isn't really specific to Mac OS X per se but which needed doing and which simplifies adding the Mac code.
Diffstat (limited to 'rpc_client_daemon.c')
-rw-r--r--rpc_client_daemon.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/rpc_client_daemon.c b/rpc_client_daemon.c
index f328302..dea352f 100644
--- a/rpc_client_daemon.c
+++ b/rpc_client_daemon.c
@@ -41,10 +41,6 @@
#include "hal.h"
#include "hal_internal.h"
-#ifndef SOCKET_NAME
-#define SOCKET_NAME "/tmp/cryptechd.socket"
-#endif
-
static int sock = -1;
hal_error_t hal_rpc_client_transport_init(void)
@@ -57,7 +53,7 @@ hal_error_t hal_rpc_client_transport_init(void)
return perror("socket"), HAL_ERROR_RPC_TRANSPORT;
memset(&name, 0, sizeof(struct sockaddr_un));
name.sun_family = AF_UNIX;
- strncpy(name.sun_path, SOCKET_NAME, sizeof(name.sun_path) - 1);
+ strncpy(name.sun_path, HAL_CLIENT_DAEMON_DEFAULT_SOCKET_NAME, sizeof(name.sun_path) - 1);
ret = connect(sock, (const struct sockaddr *) &name, sizeof(struct sockaddr_un));
if (ret == -1)
return perror("connect"), HAL_ERROR_RPC_TRANSPORT;