Changeset ad7a6c9 in mainline for uspace/srv/ns/service.c
- Timestamp:
- 2011-03-30T13:10:24Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4ae90f9
- Parents:
- 6e50466 (diff), d6b81941 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/ns/service.c
r6e50466 rad7a6c9 43 43 typedef struct { 44 44 link_t link; 45 sysarg_t service; /**< Number of the service. */45 sysarg_t service; /**< Service ID. */ 46 46 sysarg_t phone; /**< Phone registered with the service. */ 47 47 sysarg_t in_phone_hash; /**< Incoming phone hash. */ … … 56 56 * 57 57 */ 58 static hash_index_t service_hash(unsigned long *key)58 static hash_index_t service_hash(unsigned long key[]) 59 59 { 60 60 assert(key); 61 return ( *key% SERVICE_HASH_TABLE_CHAINS);61 return (key[0] % SERVICE_HASH_TABLE_CHAINS); 62 62 } 63 63 … … 86 86 87 87 if (keys == 2) 88 return ( key[1] == hs->in_phone_hash);88 return ((key[0] == hs->service) && (key[1] == hs->in_phone_hash)); 89 89 else 90 90 return (key[0] == hs->service); … … 195 195 hash_table_insert(&service_hash_table, keys, &hs->link); 196 196 197 return 0;197 return EOK; 198 198 } 199 199 … … 227 227 } 228 228 229 link_initialize(&pr->link); 229 230 pr->service = service; 230 231 pr->callid = callid;
Note:
See TracChangeset
for help on using the changeset viewer.