Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 32fef47 in mainline


Ignore:
Timestamp:
2012-04-23T17:37:39Z (10 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master
Children:
7719958, b1bd89ea
Parents:
6aae539d
Message:

remove obsolete stuff

Location:
uspace/lib/c
Files:
2 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 *
  • uspace/lib/c/include/net/modules.h

    r6aae539d r32fef47  
    4646#include <sys/time.h>
    4747
    48 /** Connect to module function type definition.
    49  *
    50  * @return Session to the service.
    51  *
    52  */
    53 typedef async_sess_t *connect_module_t(services_t);
    54 
    5548extern void answer_call(ipc_callid_t, int, ipc_call_t *, size_t);
    5649extern async_sess_t *bind_service(services_t, sysarg_t, sysarg_t, sysarg_t,
    5750    async_client_conn_t);
    58 extern async_sess_t *connect_to_service(services_t);
    59 extern int data_reply(void *, size_t);
    6051extern void refresh_answer(ipc_call_t *, size_t *);
    6152
Note: See TracChangeset for help on using the changeset viewer.