#include "sdbd_plugin.h"
#include "plugin.h"
-#define ENV_BUF_MAX 4096
-
typedef struct stinfo stinfo;
struct stinfo {
/* 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;