Change-Id: I98795f71dfab1fbc86d694d7ed357ae8387abd5d
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
}
}
+const char *afb_session_initial_token()
+{
+ return sessions.initok;
+}
+
static struct afb_session *search (const char* uuid)
{
int idx;
struct afb_session;
extern void afb_session_init(int max_session_count, int timeout, const char *initok);
+extern const char *afb_session_initial_token();
extern struct afb_session *afb_session_create (const char *uuid, int timeout);
extern struct afb_session *afb_session_get (const char *uuid, int *created);
{
struct sigaction siga;
char port[20];
+ const char *token;
int rc;
/* check whether a command is to execute or not */
}
else {
/* instanciate arguments and environment */
- if (instanciate_command_args(port, config->token) >= 0
- && instanciate_environ(port, config->token) >= 0) {
+ token = afb_session_initial_token();
+ if (instanciate_command_args(port, token) >= 0
+ && instanciate_environ(port, token) >= 0) {
/* run */
if (!SELF_PGROUP)
setpgid(0, 0);