Changeset 5bf4310 in mainline


Ignore:
Timestamp:
2013-03-24T19:07:43Z (11 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
03c2d5f
Parents:
6ec1d48
Message:

libhound: Fix switch to to stream

Location:
uspace/lib/hound/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/hound/src/client.c

    r6ec1d48 r5bf4310  
    214214                new_stream->format = format;
    215215                new_stream->context = hound;
    216                 int ret = hound_service_stream_enter(new_stream->exch,
     216                const int ret = hound_service_stream_enter(new_stream->exch,
    217217                    hound->id, flags, format, bsize);
    218218                if (ret != EOK) {
  • uspace/lib/hound/src/protocol.c

    r6ec1d48 r5bf4310  
    256256 ****/
    257257
    258 static int hound_server_read_data(void *stream);
    259 static int hound_server_write_data(void *stream);
     258static void hound_server_read_data(void *stream);
     259static void hound_server_write_data(void *stream);
    260260static const hound_server_iface_t *server_iface;
    261261
     
    435435                            server_iface->server, id);
    436436                        if (rec) {
    437                                 hound_server_write_data(stream);
     437                                if(server_iface->stream_data_read) {
     438                                        async_answer_0(callid, EOK);
     439                                        hound_server_write_data(stream);
     440                                } else {
     441                                        async_answer_0(callid, ENOTSUP);
     442                                }
    438443                        } else {
    439                                 hound_server_read_data(stream);
     444                                if (server_iface->stream_data_write) {
     445                                        async_answer_0(callid, EOK);
     446                                        hound_server_read_data(stream);
     447                                } else {
     448                                        async_answer_0(callid, ENOTSUP);
     449                                }
    440450                        }
    441451                        break;
     
    453463}
    454464
    455 static int hound_server_read_data(void *stream)
    456 {
    457         if (!server_iface || !server_iface->stream_data_write)
    458                 return ENOTSUP;
    459 
     465static void hound_server_read_data(void *stream)
     466{
    460467        ipc_callid_t callid;
    461468        ipc_call_t call;
     
    478485
    479486        async_answer_0(callid, ret);
    480         return ret;
    481 }
    482 
    483 static int hound_server_write_data(void *stream)
    484 {
    485         if (!server_iface || !server_iface->stream_data_read)
    486                 return ENOTSUP;
     487}
     488
     489static void hound_server_write_data(void *stream)
     490{
    487491
    488492        ipc_callid_t callid;
     
    505509
    506510        async_answer_0(callid, ret);
    507         return ret;
    508511}
    509512
Note: See TracChangeset for help on using the changeset viewer.