Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/net/modules.c

    r774e6d1a r45bb1d2  
    3232
    3333/** @file
    34  * Generic module functions implementation.
     34 * Generic module functions implementation. 
    3535 *
    3636 * @todo MAKE IT POSSIBLE TO REMOVE THIS FILE VIA EITHER REPLACING PART OF ITS
     
    5252#define MODULE_WAIT_TIME        (10 * 1000)
    5353
    54 /** Answer a call.
    55  *
    56  * @param[in] callid Call identifier.
    57  * @param[in] result Message processing result.
    58  * @param[in] answer Message processing answer.
    59  * @param[in] count  Number of answer parameters.
    60  *
    61  */
    62 void answer_call(ipc_callid_t callid, int result, ipc_call_t *answer,
    63     size_t count)
    64 {
    65         /* Choose the most efficient function */
    66         if ((answer != NULL) || (count == 0)) {
    67                 switch (count) {
     54/** Answers the call.
     55 *
     56 * @param[in] callid    The call identifier.
     57 * @param[in] result    The message processing result.
     58 * @param[in] answer    The message processing answer.
     59 * @param[in] answer_count The number of answer parameters.
     60 */
     61void
     62answer_call(ipc_callid_t callid, int result, ipc_call_t *answer,
     63    int answer_count)
     64{
     65        /* Choose the most efficient answer function */
     66        if (answer || (!answer_count)) {
     67                switch (answer_count) {
    6868                case 0:
    6969                        ipc_answer_0(callid, (sysarg_t) result);
     
    228228}
    229229
    230 /** Refresh answer structure and argument count.
    231  *
    232  * Erase all arguments.
    233  *
    234  * @param[in,out] answer Message processing answer structure.
    235  * @param[in,out] count  Number of answer arguments.
    236  *
    237  */
    238 void refresh_answer(ipc_call_t *answer, size_t *count)
    239 {
    240         if (count != NULL)
    241                 *count = 0;
    242        
    243         if (answer != NULL) {
     230/** Refreshes answer structure and parameters count.
     231 *
     232 * Erases all attributes.
     233 *
     234 * @param[in,out] answer The message processing answer structure.
     235 * @param[in,out] answer_count The number of answer parameters.
     236 */
     237void refresh_answer(ipc_call_t *answer, int *answer_count)
     238{
     239        if (answer_count)
     240                *answer_count = 0;
     241
     242        if (answer) {
    244243                IPC_SET_RETVAL(*answer, 0);
     244                /* Just to be precise */
    245245                IPC_SET_IMETHOD(*answer, 0);
    246246                IPC_SET_ARG1(*answer, 0);
Note: See TracChangeset for help on using the changeset viewer.