Browse Source

Fix #1122

pull/1120/merge
Max Lv 8 years ago
parent
commit
bcdc5559a8
2 changed files with 7 additions and 0 deletions
  1. 4
      src/jconf.c
  2. 3
      src/plugin.c

4
src/jconf.c

@ -201,6 +201,10 @@ read_jconf(const char *file)
conf.user = to_string(value);
} else if (strcmp(name, "plugin") == 0) {
conf.plugin = to_string(value);
if (strlen(conf.plugin) == 0) {
ss_free(conf.plugin);
conf.plugin = NULL;
}
} else if (strcmp(name, "plugin_opts") == 0) {
conf.plugin_opts = to_string(value);
} else if (strcmp(name, "fast_open") == 0) {

3
src/plugin.c

@ -94,6 +94,9 @@ start_plugin(const char *plugin,
if (plugin == NULL)
return -1;
if (strlen(plugin) == 0)
return 0;
size_t plugin_len = strlen(plugin);
size_t cmd_len = plugin_len + CMD_RESRV_LEN;
cmd = ss_malloc(cmd_len);

Loading…
Cancel
Save