implement thread pool shutdown
This commit is contained in:
@@ -304,8 +304,7 @@ static bool test_conf_syntax(char *config)
|
||||
} else if (!strcmp(line, "rmps.agent_port")) {
|
||||
i = strlen(val_ptr);
|
||||
if (i < 6) { /* max 5 digits for network port */
|
||||
if ((signed int)strspn(val_ptr,
|
||||
"1234567890") == i) {
|
||||
if ((signed int)strspn(val_ptr, "1234567890") == i) {
|
||||
i = atoi(val_ptr);
|
||||
if (i > 0 && i < 65536) {
|
||||
asprintf(&conf.rmps.agent_port, "%s", val_ptr);
|
||||
@@ -316,6 +315,18 @@ static bool test_conf_syntax(char *config)
|
||||
log(ERROR, "Invalid rmps.agent_port value: %s", val_ptr);
|
||||
val_ok = false;
|
||||
failed = true;
|
||||
} else if (!strcmp(line, "rmps.agent_poolsize")) {
|
||||
i = strlen(val_ptr);
|
||||
if ((signed int)strspn(val_ptr, "1234567890") == i) {
|
||||
i = atoi(val_ptr);
|
||||
if (i >= 0) {
|
||||
conf.rmps.agent_poolsize = i;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
log(ERROR, "Invalid rmps.agent_poolsize value: %s", val_ptr);
|
||||
val_ok = false;
|
||||
failed = true;
|
||||
} else if (!strcmp(line, "rmps.client_ip")) {
|
||||
asprintf(&conf.rmps.client_ip, "%s", val_ptr);
|
||||
} else if (!strcmp(line, "rmps.client_port")) {
|
||||
@@ -332,6 +343,18 @@ static bool test_conf_syntax(char *config)
|
||||
log(ERROR, "Invalid rmps.client_port value: %s", val_ptr);
|
||||
val_ok = false;
|
||||
failed = true;
|
||||
} else if (!strcmp(line, "rmps.client_poolsize")) {
|
||||
i = strlen(val_ptr);
|
||||
if ((signed int)strspn(val_ptr, "1234567890") == i) {
|
||||
i = atoi(val_ptr);
|
||||
if (i >= 0) {
|
||||
conf.rmps.client_poolsize = i;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
log(ERROR, "Invalid rmps.client_poolsize value: %s", val_ptr);
|
||||
val_ok = false;
|
||||
failed = true;
|
||||
} else if (!strcmp(line, "rmps.logfile")) {
|
||||
asprintf(&conf.rmps.logfile, "%s", val_ptr);
|
||||
/*if (fopen_and_mkdir(conf.rmps.logfile) != 0)
|
||||
|
||||
Reference in New Issue
Block a user