Revert "Merge plugin improvement commit"
[sdk/target/sdbd.git] / src / services.c
index 1c48905..5d40ce9 100644 (file)
@@ -54,8 +54,6 @@
 #include "sdbd_plugin.h"
 #include "plugin.h"
 
-#define ENV_BUF_MAX     4096
-
 typedef struct stinfo stinfo;
 
 struct stinfo {
@@ -649,14 +647,13 @@ static int create_subproc_thread(const char *name, int lines, int columns)
 
     /* get environment variables from plugin */
     char *envp_plugin = NULL;
-    envp_plugin = malloc(ENV_BUF_MAX);
+    envp_plugin = malloc(SDBD_PLUGIN_OUTBUF_MAX);
     if (envp_plugin == NULL) {
         D("Cannot allocate the shell commnad buffer.");
         return -1;
     }
-    memset(envp_plugin, 0, ENV_BUF_MAX);
-    if (!request_conversion_to_plugin(PLUGIN_SYNC_CMD_GET_SHELL_ENV, NULL,
-                envp_plugin, ENV_BUF_MAX)) {
+    memset(envp_plugin, 0, SDBD_PLUGIN_OUTBUF_MAX);
+    if (!request_plugin_cmd(SDBD_CMD_SHELL_ENVVAR, "", envp_plugin, SDBD_PLUGIN_OUTBUF_MAX)) {
         D("Failed to convert the shell command. (%s)\n", name);
         free(envp_plugin);
         return -1;