Changeset ad7a6c9 in mainline for uspace/srv/ns/service.c


Ignore:
Timestamp:
2011-03-30T13:10:24Z (14 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
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.
Message:

Merge mainline changes

File:
1 edited

Legend:

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

    r6e50466 rad7a6c9  
    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.