Rev 1649 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 1649 | Rev 1719 | ||
|---|---|---|---|
| Line 79... | Line 79... | ||
| 79 | ipcarg_t service; /**< Number of the service. */ |
79 | ipcarg_t service; /**< Number of the service. */ |
| 80 | ipcarg_t phone; /**< Phone registered with the service. */ |
80 | ipcarg_t phone; /**< Phone registered with the service. */ |
| 81 | ipcarg_t in_phone_hash; /**< Incoming phone hash. */ |
81 | ipcarg_t in_phone_hash; /**< Incoming phone hash. */ |
| 82 | } hashed_service_t; |
82 | } hashed_service_t; |
| 83 | 83 | ||
| 84 | int static ping_phone; |
- | |
| 85 | - | ||
| 86 | static void *clockaddr = NULL; |
84 | static void *clockaddr = NULL; |
| 87 | static void *klogaddr = NULL; |
85 | static void *klogaddr = NULL; |
| 88 | 86 | ||
| 89 | static void get_as(ipc_callid_t callid, ipc_call_t *call, char *name, void **addr) |
87 | static void get_as(ipc_callid_t callid, ipc_call_t *call, char *name, void **addr) |
| 90 | { |
88 | { |
| Line 104... | Line 102... | ||
| 104 | 102 | ||
| 105 | int main(int argc, char **argv) |
103 | int main(int argc, char **argv) |
| 106 | { |
104 | { |
| 107 | ipc_call_t call; |
105 | ipc_call_t call; |
| 108 | ipc_callid_t callid; |
106 | ipc_callid_t callid; |
| 109 | char *as_area; |
- | |
| 110 | 107 | ||
| 111 | ipcarg_t retval, arg1, arg2; |
108 | ipcarg_t retval; |
| 112 | 109 | ||
| 113 | if (!hash_table_create(&ns_hash_table, NS_HASH_TABLE_CHAINS, 3, &ns_hash_table_ops)) { |
110 | if (!hash_table_create(&ns_hash_table, NS_HASH_TABLE_CHAINS, 3, &ns_hash_table_ops)) { |
| 114 | return ENOMEM; |
111 | return ENOMEM; |
| 115 | } |
112 | } |
| 116 | 113 | ||
| Line 147... | Line 144... | ||
| 147 | default: |
144 | default: |
| 148 | retval = ENOENT; |
145 | retval = ENOENT; |
| 149 | break; |
146 | break; |
| 150 | } |
147 | } |
| 151 | if (! (callid & IPC_CALLID_NOTIFICATION)) { |
148 | if (! (callid & IPC_CALLID_NOTIFICATION)) { |
| 152 | ipc_answer_fast(callid, retval, arg1, arg2); |
149 | ipc_answer_fast(callid, retval, 0, 0); |
| 153 | } |
150 | } |
| 154 | } |
151 | } |
| 155 | } |
152 | } |
| 156 | 153 | ||
| 157 | /** Register service. |
154 | /** Register service. |
| Line 255... | Line 252... | ||
| 255 | void ns_remove(link_t *item) |
252 | void ns_remove(link_t *item) |
| 256 | { |
253 | { |
| 257 | assert(item); |
254 | assert(item); |
| 258 | free(hash_table_get_instance(item, hashed_service_t, link)); |
255 | free(hash_table_get_instance(item, hashed_service_t, link)); |
| 259 | } |
256 | } |
| - | 257 | ||
| 260 | /** |
258 | /** |
| 261 | * @} |
259 | * @} |
| 262 | */ |
260 | */ |