summaryrefslogtreecommitdiff
path: root/netcon/Intercept.c
diff options
context:
space:
mode:
authorJoseph Henry <josephjah@gmail.com>2015-12-14 14:45:25 -0800
committerJoseph Henry <josephjah@gmail.com>2015-12-14 14:45:25 -0800
commita421e31dd5bfdece693092a0b6fb7a204b5fba42 (patch)
tree2b128f4322c1ec057df0c2979aea6282072a825d /netcon/Intercept.c
parentf558b088e6c62c3531ce3e85f28c9284f0898971 (diff)
downloadinfinitytier-a421e31dd5bfdece693092a0b6fb7a204b5fba42.tar.gz
infinitytier-a421e31dd5bfdece693092a0b6fb7a204b5fba42.zip
send_cmd() retrun value bugfix + minor debug changes
Diffstat (limited to 'netcon/Intercept.c')
-rw-r--r--netcon/Intercept.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/netcon/Intercept.c b/netcon/Intercept.c
index 2830c3ac..ad48b7d4 100644
--- a/netcon/Intercept.c
+++ b/netcon/Intercept.c
@@ -138,7 +138,7 @@ static void checkpid()
return;
if (thispid != getpid()) {
- printf("clone/fork detected. re-initializing this instance.\n");
+ dwr(MSG_DEBUG, "checkpid(): clone/fork detected. Re-initializing this instance.\n");
set_up_intercept();
fdret_sock = init_service_connection();
thispid = getpid();
@@ -216,12 +216,11 @@ static int send_cmd(int rpc_fd, char *cmd)
#endif
/* Combine command flag+payload with RPC metadata */
memcpy(&metabuf[IDX_PAYLOAD], cmd, PAYLOAD_SZ);
- usleep(1000);
+ usleep(100000);
int n_write = write(rpc_fd, &metabuf, BUF_SZ);
if(n_write < 0){
dwr(MSG_DEBUG,"Error writing command to service (CMD = %d)\n", cmd[0]);
errno = 0;
- return -1;
}
int ret = ERR_OK;