Changeset 8b5690f in mainline for uspace/srv/ns/service.c


Ignore:
Timestamp:
2011-02-03T05:11:01Z (13 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ba38f72c
Parents:
22027b6e (diff), 86d7bfa (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.
Message:

Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/ns/service.c

    r22027b6e r8b5690f  
    4343typedef struct {
    4444        link_t link;
    45         sysarg_t service;        /**< Number of the service. */
     45        sysarg_t service;        /**< Service ID. */
    4646        sysarg_t phone;          /**< Phone registered with the service. */
    4747        sysarg_t in_phone_hash;  /**< Incoming phone hash. */
     
    5656 *
    5757 */
    58 static hash_index_t service_hash(unsigned long *key)
     58static hash_index_t service_hash(unsigned long key[])
    5959{
    6060        assert(key);
    61         return (*key % SERVICE_HASH_TABLE_CHAINS);
     61        return (key[0] % SERVICE_HASH_TABLE_CHAINS);
    6262}
    6363
     
    8686       
    8787        if (keys == 2)
    88                 return (key[1] == hs->in_phone_hash);
     88                return ((key[0] == hs->service) && (key[1] == hs->in_phone_hash));
    8989        else
    9090                return (key[0] == hs->service);
     
    195195        hash_table_insert(&service_hash_table, keys, &hs->link);
    196196       
    197         return 0;
     197        return EOK;
    198198}
    199199
     
    227227                        }
    228228                       
     229                        link_initialize(&pr->link);
    229230                        pr->service = service;
    230231                        pr->callid = callid;
Note: See TracChangeset for help on using the changeset viewer.