Logo Search packages:      
Sourcecode: ladish version File versions  Download package

bool ladish_app_supervisor_set_directory ( ladish_app_supervisor_handle  supervisor_handle,
const char *  dir 
)

Set the directory where apps will be started. If never called, apps will be started in the root directory ("/")

Parameters:
[in]supervisor_handlesupervisor object handle
[in]dirdirectory where apps will be started
Returns:
success status

Definition at line 501 of file app_supervisor.c.

{
  char * dup;

  dup = strdup(dir);
  if (dup == NULL)
  {
    log_error("strdup(\"%s\") failed", dir);
    return false;
  }

  if (supervisor_ptr->dir != NULL)
  {
    free(supervisor_ptr->dir);
  }

  supervisor_ptr->dir = dup;

  return true;
}

Generated by  Doxygen 1.6.0   Back to index