smarter config management in the emperor

This commit is contained in:
roberto@quantal64
2012-07-10 18:16:20 +02:00
parent 36cc5434fd
commit 8fc9b14db4
2 changed files with 6 additions and 1 deletions
+4
View File
@@ -432,6 +432,10 @@ void emperor_add(char *name, time_t born, char *config, uint32_t config_size, ui
int i;
struct timeval tv;
#ifdef UWSGI_DEBUG
uwsgi_log("\n\nVASSAL %s %d %.*s %d %d\n", name, born, config_size, config, uid, gid);
#endif
if (strlen(name) > (0xff - 1)) {
uwsgi_log("[emperor] invalid vassal name\n", name);
return;
+2 -1
View File
@@ -38,7 +38,8 @@ void emperor_pg_do(char *name, char *config, time_t ts, uid_t uid, gid_t gid) {
}
}
else {
emperor_add(name, ts, config, strlen(config), uid, gid);
// make a copy of the config as it will be freed
emperor_add(name, ts, uwsgi_str(config), strlen(config), uid, gid);
}
}