Changeset 32fef47 in mainline for uspace/lib/c/generic/net/modules.c


Ignore:
Timestamp:
2012-04-23T17:37:39Z (12 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7719958, b1bd89ea
Parents:
6aae539d
Message:

remove obsolete stuff

File:
1 edited

Legend:

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

    r6aae539d r32fef47  
    9393}
    9494
     95/** Connect to the needed module.
     96 *
     97 * @param[in] need Needed module service.
     98 *
     99 * @return Session to the needed service.
     100 * @return NULL if the connection timeouted.
     101 *
     102 */
     103static async_sess_t *connect_to_service(services_t need)
     104{
     105        return service_connect_blocking(EXCHANGE_SERIALIZE, need, 0, 0);
     106}
     107
    95108/** Create bidirectional connection with the needed module service and register
    96109 * the message receiver.
     
    129142}
    130143
    131 /** Connect to the needed module.
    132  *
    133  * @param[in] need Needed module service.
    134  *
    135  * @return Session to the needed service.
    136  * @return NULL if the connection timeouted.
    137  *
    138  */
    139 async_sess_t *connect_to_service(services_t need)
    140 {
    141         return service_connect_blocking(EXCHANGE_SERIALIZE, need, 0, 0);
    142 }
    143 
    144 /** Reply the data to the other party.
    145  *
    146  * @param[in] data        The data buffer to be sent.
    147  * @param[in] data_length The buffer length.
    148  *
    149  * @return EOK on success.
    150  * @return EINVAL if the client does not expect the data.
    151  * @return EOVERFLOW if the client does not expect all the data.
    152  *         Only partial data are transfered.
    153  * @return Other error codes as defined for the
    154  *         async_data_read_finalize() function.
    155  *
    156  */
    157 int data_reply(void *data, size_t data_length)
    158 {
    159         size_t length;
    160         ipc_callid_t callid;
    161        
    162         /* Fetch the request */
    163         if (!async_data_read_receive(&callid, &length))
    164                 return EINVAL;
    165        
    166         /* Check the requested data size */
    167         if (length < data_length) {
    168                 async_data_read_finalize(callid, data, length);
    169                 return EOVERFLOW;
    170         }
    171        
    172         /* Send the data */
    173         return async_data_read_finalize(callid, data, data_length);
    174 }
    175 
    176144/** Refresh answer structure and argument count.
    177145 *
Note: See TracChangeset for help on using the changeset viewer.