|
|
@ -514,30 +514,30 @@ retry: |
|
|
|
LOGWARNING("Failed to get message in connector_loop"); |
|
|
|
LOGWARNING("Failed to get message in connector_loop"); |
|
|
|
goto retry; |
|
|
|
goto retry; |
|
|
|
} |
|
|
|
} |
|
|
|
if (!strncasecmp(buf, "ping", 4)) { |
|
|
|
if (cmdmatch(buf, "ping")) { |
|
|
|
LOGDEBUG("Connector received ping request"); |
|
|
|
LOGDEBUG("Connector received ping request"); |
|
|
|
send_unix_msg(sockd, "pong"); |
|
|
|
send_unix_msg(sockd, "pong"); |
|
|
|
goto retry; |
|
|
|
goto retry; |
|
|
|
} |
|
|
|
} |
|
|
|
if (!strncasecmp(buf, "accept", 6)) { |
|
|
|
if (cmdmatch(buf, "accept")) { |
|
|
|
LOGDEBUG("Connector received accept signal"); |
|
|
|
LOGDEBUG("Connector received accept signal"); |
|
|
|
ci->accept = true; |
|
|
|
ci->accept = true; |
|
|
|
goto retry; |
|
|
|
goto retry; |
|
|
|
} |
|
|
|
} |
|
|
|
if (!strncasecmp(buf, "reject", 6)) { |
|
|
|
if (cmdmatch(buf, "reject")) { |
|
|
|
LOGDEBUG("Connector received reject signal"); |
|
|
|
LOGDEBUG("Connector received reject signal"); |
|
|
|
ci->accept = false; |
|
|
|
ci->accept = false; |
|
|
|
goto retry; |
|
|
|
goto retry; |
|
|
|
} |
|
|
|
} |
|
|
|
if (!strncasecmp(buf, "loglevel", 8)) { |
|
|
|
if (cmdmatch(buf, "loglevel")) { |
|
|
|
sscanf(buf, "loglevel=%d", &ckp->loglevel); |
|
|
|
sscanf(buf, "loglevel=%d", &ckp->loglevel); |
|
|
|
goto retry; |
|
|
|
goto retry; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
LOGDEBUG("Connector received message: %s", buf); |
|
|
|
LOGDEBUG("Connector received message: %s", buf); |
|
|
|
if (!strncasecmp(buf, "shutdown", 8)) |
|
|
|
if (cmdmatch(buf, "shutdown")) |
|
|
|
goto out; |
|
|
|
goto out; |
|
|
|
if (!strncasecmp(buf, "dropclient", 10)) { |
|
|
|
if (cmdmatch(buf, "dropclient")) { |
|
|
|
client_instance_t *client; |
|
|
|
client_instance_t *client; |
|
|
|
int client_id; |
|
|
|
int client_id; |
|
|
|
|
|
|
|
|
|
|
@ -556,7 +556,7 @@ retry: |
|
|
|
LOGINFO("Connector dropped client id: %d", client_id); |
|
|
|
LOGINFO("Connector dropped client id: %d", client_id); |
|
|
|
goto retry; |
|
|
|
goto retry; |
|
|
|
} |
|
|
|
} |
|
|
|
if (!strncasecmp(buf, "getfd", 5)) { |
|
|
|
if (cmdmatch(buf, "getfd")) { |
|
|
|
send_fd(ci->serverfd, sockd); |
|
|
|
send_fd(ci->serverfd, sockd); |
|
|
|
goto retry; |
|
|
|
goto retry; |
|
|
|
} |
|
|
|
} |
|
|
|