Ignore:
Timestamp:
2010-04-23T21:42:26Z (15 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6c39a907
Parents:
38aaacc2 (diff), 80badbe (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/net/nil/nildummy/nildummy_module.c

    r38aaacc2 rf4f866c  
    4646#include <net_interface.h>
    4747#include <packet/packet.h>
    48 #include <nil_module.h>
    49 #include <nil_standalone.h>
     48#include <nil_local.h>
    5049
    5150#include "nildummy.h"
    5251
    53 /** Starts the dummy nil module.
    54  *  Initializes the client connection serving function, initializes the module, registers the module service and starts the async manager, processing IPC messages in an infinite loop.
    55  *  @param[in] client_connection The client connection processing function. The module skeleton propagates its own one.
    56  *  @returns EOK on success.
    57  *  @returns Other error codes as defined for the pm_init() function.
    58  *  @returns Other error codes as defined for the nil_initialize() function.
    59  *  @returns Other error codes as defined for the REGISTER_ME() macro function.
     52/** Start the dummy nil module.
     53 *
     54 * Initialize the client connection serving function, initialize
     55 * the module, register the module service and start the async
     56 * manager, processing IPC messages in an infinite loop.
     57 *
     58 * @param[in] client_connection The client connection processing
     59 *                              function. The module skeleton propagates
     60 *                              its own one.
     61 *
     62 * @return EOK on success.
     63 * @return Other error codes as defined for the pm_init() function.
     64 * @return Other error codes as defined for the nil_initialize() function.
     65 * @return Other error codes as defined for the REGISTER_ME() macro function.
     66 *
    6067 */
    61 int nil_module_start(async_client_conn_t client_connection){
     68int nil_module_start_standalone(async_client_conn_t client_connection)
     69{
    6270        ERROR_DECLARE;
    63 
     71       
     72        async_set_client_connection(client_connection);
     73        int net_phone = net_connect_module(SERVICE_NETWORKING);
     74        ERROR_PROPAGATE(pm_init());
     75       
    6476        ipcarg_t phonehash;
    65         int net_phone;
    66 
    67         async_set_client_connection(client_connection);
    68         net_phone = net_connect_module(SERVICE_NETWORKING);
    69         ERROR_PROPAGATE(pm_init());
    70         if(ERROR_OCCURRED(nil_initialize(net_phone))
    71                 || ERROR_OCCURRED(REGISTER_ME(SERVICE_NILDUMMY, &phonehash))){
     77        if (ERROR_OCCURRED(nil_initialize(net_phone))
     78            || ERROR_OCCURRED(REGISTER_ME(SERVICE_NILDUMMY, &phonehash))){
    7279                pm_destroy();
    7380                return ERROR_CODE;
    7481        }
    75 
     82       
    7683        async_manager();
    77 
     84       
    7885        pm_destroy();
    7986        return EOK;
    8087}
    8188
    82 /** Passes the parameters to the module specific nil_message() function.
    83  *  @param[in] callid The message identifier.
    84  *  @param[in] call The message parameters.
    85  *  @param[out] answer The message answer parameters.
    86  *  @param[out] answer_count The last parameter for the actual answer in the answer parameter.
    87  *  @returns EOK on success.
    88  *  @returns ENOTSUP if the message is not known.
    89  *  @returns Other error codes as defined for each specific module message function.
     89/** Pass the parameters to the module specific nil_message() function.
     90 *
     91 * @param[in]  name         Module name.
     92 * @param[in]  callid       The message identifier.
     93 * @param[in]  call         The message parameters.
     94 * @param[out] answer       The message answer parameters.
     95 * @param[out] answer_count The last parameter for the actual answer
     96 *                          in the answer parameter.
     97 *
     98 * @return EOK on success.
     99 * @return ENOTSUP if the message is not known.
     100 * @return Other error codes as defined for each specific
     101 *          module message function.
     102 *
    90103 */
    91 int nil_module_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count){
    92         return nil_message(callid, call, answer, answer_count);
     104int nil_module_message_standalone(const char *name, ipc_callid_t callid,
     105    ipc_call_t *call, ipc_call_t *answer, int *answer_count)
     106{
     107        return nil_message_standalone(name, callid, call, answer, answer_count);
    93108}
    94109
Note: See TracChangeset for help on using the changeset viewer.