mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-08 14:41:55 +00:00
build fix without udp
This commit is contained in:
+1
-1
@@ -25,4 +25,4 @@ xml_implementation = libxml2
|
||||
plugins =
|
||||
bin_name = /opt/unbit/bin/uwsgi
|
||||
plugin_dir = /opt/unbit/uwsgi_plugins
|
||||
embedded_plugins =
|
||||
embedded_plugins = python
|
||||
|
||||
@@ -71,7 +71,6 @@ void master_loop(char **argv, char **environ) {
|
||||
socklen_t udp_len;
|
||||
char udp_client_addr[16];
|
||||
int udp_managed = 0;
|
||||
int rlen;
|
||||
int udp_fd = -1 ;
|
||||
|
||||
char *cluster_opt_buf = NULL;
|
||||
@@ -84,6 +83,7 @@ void master_loop(char **argv, char **environ) {
|
||||
#endif
|
||||
|
||||
int i,j;
|
||||
int rlen;
|
||||
|
||||
int check_interval = 1;
|
||||
|
||||
@@ -529,6 +529,7 @@ void master_loop(char **argv, char **environ) {
|
||||
uwsgi.workers[i].last_running_time = uwsgi.workers[i].running_time;
|
||||
}
|
||||
|
||||
#ifdef UWSGI_UDP
|
||||
// check for cluster nodes
|
||||
for (i = 0; i < MAX_CLUSTER_NODES; i++) {
|
||||
struct uwsgi_cluster_node *ucn = &uwsgi.shared->nodes[i];
|
||||
@@ -561,6 +562,8 @@ void master_loop(char **argv, char **environ) {
|
||||
|
||||
continue;
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
#ifdef UWSGI_SPOOLER
|
||||
/* reload the spooler */
|
||||
|
||||
@@ -575,10 +575,12 @@ int main(int argc, char *argv[], char *envp[])
|
||||
//parse environ
|
||||
parse_sys_envs(environ);
|
||||
|
||||
#ifdef UWSGI_UDP
|
||||
// get cluster configuration
|
||||
uwsgi_log("CLUSTER: %s\n", uwsgi.cluster);
|
||||
if (uwsgi.cluster != NULL) {
|
||||
// get multicast socket
|
||||
|
||||
uwsgi_log("CLUSTER: %s\n", uwsgi.cluster);
|
||||
uwsgi.cluster_fd = uwsgi_cluster_join(uwsgi.cluster);
|
||||
|
||||
// ask for cluster options only if bot pre-existent options are set
|
||||
@@ -612,6 +614,7 @@ options_parsed:
|
||||
uwsgi_cluster_add_me();
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef UWSGI_PROXY
|
||||
if (uwsgi.proxy_add_me) {
|
||||
@@ -1547,12 +1550,14 @@ end:
|
||||
|
||||
case 0:
|
||||
return 1;
|
||||
#ifdef UWSGI_UDP
|
||||
case LONG_ARGS_CLUSTER_RELOAD:
|
||||
send_udp_message(98, optarg, "", 0);
|
||||
break;
|
||||
case LONG_ARGS_CLUSTER_LOG:
|
||||
uwsgi_stdin_sendto(optarg, 96, 0);
|
||||
break;
|
||||
#endif
|
||||
case LONG_ARGS_VHOSTHOST:
|
||||
uwsgi.vhost = 1;
|
||||
uwsgi.vhost_host = 1;
|
||||
@@ -2280,6 +2285,7 @@ void manage_string_opt(char *key, uint16_t keylen, char *val, uint16_t vallen, v
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef UWSGI_UDP
|
||||
int uwsgi_cluster_add_me() {
|
||||
|
||||
const char *key1 = "hostname";
|
||||
@@ -2390,6 +2396,7 @@ void uwsgi_stdin_sendto(char *socket_name, uint8_t modifier1, uint8_t modifier2)
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
char *uwsgi_cluster_best_node() {
|
||||
|
||||
Reference in New Issue
Block a user