|
|
|
@ -2996,6 +2996,8 @@ int brain_server (const char *listen_host, const int listen_port, const char *br
|
|
|
|
|
{
|
|
|
|
|
brain_logging (stderr, 0, "socket: %s\n", strerror (errno));
|
|
|
|
|
|
|
|
|
|
if (brain_password == NULL) hcfree (auth_password);
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -3006,6 +3008,8 @@ int brain_server (const char *listen_host, const int listen_port, const char *br
|
|
|
|
|
{
|
|
|
|
|
brain_logging (stderr, 0, "setsockopt: %s\n", strerror (errno));
|
|
|
|
|
|
|
|
|
|
if (brain_password == NULL) hcfree (auth_password);
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -3013,6 +3017,8 @@ int brain_server (const char *listen_host, const int listen_port, const char *br
|
|
|
|
|
{
|
|
|
|
|
brain_logging (stderr, 0, "setsockopt: %s\n", strerror (errno));
|
|
|
|
|
|
|
|
|
|
if (brain_password == NULL) hcfree (auth_password);
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
#else
|
|
|
|
@ -3054,6 +3060,8 @@ int brain_server (const char *listen_host, const int listen_port, const char *br
|
|
|
|
|
{
|
|
|
|
|
brain_logging (stderr, 0, "%s: %s\n", listen_host, gai_strerror (rc_getaddrinfo));
|
|
|
|
|
|
|
|
|
|
if (brain_password == NULL) hcfree (auth_password);
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -3062,6 +3070,8 @@ int brain_server (const char *listen_host, const int listen_port, const char *br
|
|
|
|
|
{
|
|
|
|
|
brain_logging (stderr, 0, "bind: %s\n", strerror (errno));
|
|
|
|
|
|
|
|
|
|
if (brain_password == NULL) hcfree (auth_password);
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -3069,6 +3079,8 @@ int brain_server (const char *listen_host, const int listen_port, const char *br
|
|
|
|
|
{
|
|
|
|
|
brain_logging (stderr, 0, "listen: %s\n", strerror (errno));
|
|
|
|
|
|
|
|
|
|
if (brain_password == NULL) hcfree (auth_password);
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -3078,6 +3090,8 @@ int brain_server (const char *listen_host, const int listen_port, const char *br
|
|
|
|
|
{
|
|
|
|
|
brain_logging (stderr, 0, "%s\n", MSG_ENOMEM);
|
|
|
|
|
|
|
|
|
|
if (brain_password == NULL) hcfree (auth_password);
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -3090,11 +3104,15 @@ int brain_server (const char *listen_host, const int listen_port, const char *br
|
|
|
|
|
{
|
|
|
|
|
brain_logging (stderr, 0, "%s\n", MSG_ENOMEM);
|
|
|
|
|
|
|
|
|
|
if (brain_password == NULL) hcfree (auth_password);
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (brain_server_read_hash_dumps (brain_server_dbs, ".") == false)
|
|
|
|
|
{
|
|
|
|
|
if (brain_password == NULL) hcfree (auth_password);
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -3105,11 +3123,15 @@ int brain_server (const char *listen_host, const int listen_port, const char *br
|
|
|
|
|
{
|
|
|
|
|
brain_logging (stderr, 0, "%s\n", MSG_ENOMEM);
|
|
|
|
|
|
|
|
|
|
if (brain_password == NULL) hcfree (auth_password);
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (brain_server_read_attack_dumps (brain_server_dbs, ".") == false)
|
|
|
|
|
{
|
|
|
|
|
if (brain_password == NULL) hcfree (auth_password);
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -3119,6 +3141,8 @@ int brain_server (const char *listen_host, const int listen_port, const char *br
|
|
|
|
|
{
|
|
|
|
|
brain_logging (stderr, 0, "%s\n", MSG_ENOMEM);
|
|
|
|
|
|
|
|
|
|
if (brain_password == NULL) hcfree (auth_password);
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -3135,6 +3159,8 @@ int brain_server (const char *listen_host, const int listen_port, const char *br
|
|
|
|
|
{
|
|
|
|
|
brain_logging (stderr, 0, "%s\n", MSG_ENOMEM);
|
|
|
|
|
|
|
|
|
|
if (brain_password == NULL) hcfree (auth_password);
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -3163,6 +3189,8 @@ int brain_server (const char *listen_host, const int listen_port, const char *br
|
|
|
|
|
{
|
|
|
|
|
brain_logging (stderr, 0, "%s\n", MSG_ENOMEM);
|
|
|
|
|
|
|
|
|
|
if (brain_password == NULL) hcfree (auth_password);
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -3185,6 +3213,8 @@ int brain_server (const char *listen_host, const int listen_port, const char *br
|
|
|
|
|
{
|
|
|
|
|
brain_logging (stderr, 0, "signal: %s\n", strerror (errno));
|
|
|
|
|
|
|
|
|
|
if (brain_password == NULL) hcfree (auth_password);
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -3258,11 +3288,15 @@ int brain_server (const char *listen_host, const int listen_port, const char *br
|
|
|
|
|
|
|
|
|
|
if (brain_server_write_hash_dumps (brain_server_dbs, ".") == false)
|
|
|
|
|
{
|
|
|
|
|
if (brain_password == NULL) hcfree (auth_password);
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (brain_server_write_attack_dumps (brain_server_dbs, ".") == false)
|
|
|
|
|
{
|
|
|
|
|
if (brain_password == NULL) hcfree (auth_password);
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -3287,6 +3321,8 @@ int brain_server (const char *listen_host, const int listen_port, const char *br
|
|
|
|
|
|
|
|
|
|
hcfree (brain_server_client_options);
|
|
|
|
|
|
|
|
|
|
if (brain_password == NULL) hcfree (auth_password);
|
|
|
|
|
|
|
|
|
|
close (server_fd);
|
|
|
|
|
|
|
|
|
|
#if defined (_WIN)
|
|
|
|
|