Commit a75b2d88 authored by Danilo Sabato's avatar Danilo Sabato Committed by Alessandro Rubini

arch-bare-linux: fix ppi's fields init at startup

parent bc3bf431
......@@ -24,6 +24,16 @@ static struct pp_instance ppi_static;
static struct pp_net_path net_path_static;
int pp_diag_verbosity = 0;
/* ppi fields */
static UInteger16 sent_seq_id[16];
static DSDefault defaultDS;
static DSCurrent currentDS;
static DSParent parentDS;
static DSPort portDS;
static DSTimeProperties timePropertiesDS;
static struct pp_servo servo;
static struct pp_frgn_master frgn_master;
void ppsi_main(void)
{
struct pp_instance *ppi = &ppi_static; /* no malloc, one instance */
......@@ -31,11 +41,27 @@ void ppsi_main(void)
PP_PRINTF("bare: starting. Compiled on %s\n", __DATE__);
ppi->net_path = &net_path_static;
ppi->sent_seq_id = sent_seq_id;
ppi->defaultDS = &defaultDS;
ppi->currentDS = &currentDS;
ppi->parentDS = &parentDS;
ppi->portDS = &portDS;
ppi->timePropertiesDS = &timePropertiesDS;
ppi->servo = &servo;
ppi->frgn_master = &frgn_master;
ppi->arch_data = NULL;
if (bare_open_ch(ppi, "eth0")) {
pp_diag_error(ppi, bare_errno);
pp_diag_fatal(ppi, "open_ch", "");
}
pp_open_instance(ppi, NULL);
OPTS(ppi)->iface_name = "eth0";
#ifdef PPSI_SLAVE
OPTS(ppi)->slave_only = 1;
#endif
bare_main_loop(ppi);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment