Changeset 8fb1bf82 in mainline for uspace/srv/net/nil/nildummy/nildummy_module.c
- Timestamp:
- 2010-11-25T13:42:50Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8df8415
- Parents:
- a93d79a (diff), eb667613 (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/net/nil/nildummy/nildummy_module.c
ra93d79a r8fb1bf82 38 38 #include <async.h> 39 39 #include <stdio.h> 40 #include <err .h>40 #include <errno.h> 41 41 42 42 #include <ipc/ipc.h> … … 50 50 #include "nildummy.h" 51 51 52 /** Start the dummy nil module.53 *54 * Initialize the client connection serving function, initialize55 * the module, register the module service and start the async56 * manager, processing IPC messages in an infinite loop.57 *58 * @param[in] client_connection The client connection processing59 * function. The module skeleton propagates60 * 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 *67 */68 52 int nil_module_start_standalone(async_client_conn_t client_connection) 69 53 { 70 ERROR_DECLARE; 54 ipcarg_t phonehash; 55 int rc; 71 56 72 57 async_set_client_connection(client_connection); 73 58 int net_phone = net_connect_module(); 74 ERROR_PROPAGATE(pm_init());75 59 76 ipcarg_t phonehash; 77 if (ERROR_OCCURRED(nil_initialize(net_phone)) 78 || ERROR_OCCURRED(REGISTER_ME(SERVICE_NILDUMMY, &phonehash))){ 79 pm_destroy(); 80 return ERROR_CODE; 81 } 60 rc = pm_init(); 61 if (rc != EOK) 62 return rc; 63 64 65 rc = nil_initialize(net_phone); 66 if (rc != EOK) 67 goto out; 68 69 rc = REGISTER_ME(SERVICE_NILDUMMY, &phonehash); 70 if (rc != EOK) 71 goto out; 82 72 83 73 async_manager(); 84 74 75 out: 85 76 pm_destroy(); 86 return EOK;77 return rc; 87 78 } 88 79 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 answer96 * 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 specific101 * module message function.102 *103 */104 80 int nil_module_message_standalone(const char *name, ipc_callid_t callid, 105 81 ipc_call_t *call, ipc_call_t *answer, int *answer_count)
Note:
See TracChangeset
for help on using the changeset viewer.