Project

General

Profile

Revision 983

Fixed initialization of simulators struct

View differences:

main.c
36 36
    return -1;
37 37
  }                       
38 38
  
39
  //Need to consider if this actually works...
40 39
  char var[21];
41 40
  sprintf(var, "memory_id=%d", sim_memory->robotSharedMemoryID);
42 41
  char *envp[] = {var, NULL};
......
46 45
    signal(SIGCHLD, SIG_DFL);
47 46

  
48 47
    execve(execname, NULL, envp);  //TODO: keep the other env. stuff around
49
    printf ("error! exec failed\n");
48
    printf ("error! exec failed \n");
49
	
50 50
    exit(-1);
51 51
  }
52 52
                   
......
74 74
  signal(SIGCHLD, sig_chld_handler);
75 75

  
76 76
  RobotShared* robot;
77
  SimulatorRobot* sim;
77
  SimulatorRobot sim;
78 78

  
79
  create_robot("robot_test/robot", 0, &robot, sim);
79
  create_robot("robot_test/robot", 0, &robot, &sim);
80 80

  
81 81
  printf("returned to parent\n");
82 82

  

Also available in: Unified diff