Project

General

Profile

Revision 170

changed order of operations in cycle

View differences:

proj.c
46 46
}
47 47

  
48 48
int(proj_main_loop)(int argc, char *argv[]) {
49

  
50
    int r;
51

  
52
    /// subscribe interrupts
53
    if (subscribe_all()) { return 1; }
54

  
55
    /// initialize graphics
49 56
    if(graph_init(GRAPH_MODE)){
50 57
        printf("%s: failed to initalize graphics.\n", __func__);
51 58
        if (cleanup()) printf("%s: failed to cleanup.\n", __func__);
......
72 79
    #endif
73 80

  
74 81
    /// loop stuff
75
    int ipc_status, r;
82
    int ipc_status;
76 83
    message msg;
77

  
78
    /// subscribe interrupts
79
    if (subscribe_all()) {
80
        if (cleanup())
81
            printf("%s: failed to cleanup.\n", __func__);
82
        return 1;
83
    }
84

  
85
    /// cycle
86 84
    int good = 1;
87 85

  
88 86
    #ifdef DIOGO

Also available in: Unified diff