Rev 3666 | Rev 3912 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3666 | Rev 3685 | ||
---|---|---|---|
Line 40... | Line 40... | ||
40 | #include "modules.h" |
40 | #include "modules.h" |
41 | 41 | ||
42 | #define MODULE_WAIT_TIME 10000 |
42 | #define MODULE_WAIT_TIME 10000 |
43 | 43 | ||
44 | int connect_to_service( services_t need ){ |
44 | int connect_to_service( services_t need ){ |
45 | int phone; |
45 | ipcarg_t phone; |
- | 46 | int res; |
|
46 | 47 | ||
47 | phone = ipc_connect_me_to( PHONE_NS, need, 0, 0 ); |
48 | res = async_req_3_5( PHONE_NS, IPC_M_CONNECT_ME_TO, need, 0, 0, NULL, NULL, NULL, NULL, & phone ); |
48 | if( phone < 0 ){ |
49 | while(( res < 0 ) || ( phone < 0 )){ |
49 | do{ |
- | |
50 | usleep( MODULE_WAIT_TIME ); |
50 | usleep( MODULE_WAIT_TIME ); |
51 | phone = ipc_connect_me_to( PHONE_NS, need, 0, 0 ); |
51 | res = async_req_3_5( PHONE_NS, IPC_M_CONNECT_ME_TO, need, 0, 0, NULL, NULL, NULL, NULL, & phone ); |
52 | }while( phone < 0 ); |
- | |
53 | } |
52 | } |
54 | return phone; |
53 | return phone; |
55 | } |
54 | } |
56 | 55 | ||
57 | int start_service( services_t me, services_t need[], int * need_phone[], void ( * client_connection )( ipc_callid_t iid, ipc_call_t * icall ), int ( * initialize_me )( void )){ |
56 | int start_service( services_t me, services_t need[], int * need_phone[], void ( * client_connection )( ipc_callid_t iid, ipc_call_t * icall ), int ( * initialize_me )( void )){ |