Changeset a9aae16e in mainline


Ignore:
Timestamp:
2012-07-15T20:50:46Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
eceb300
Parents:
b7c080c
Message:

libhoud: Handle hangup in connection callback.

File:
1 edited

Legend:

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

    rb7c080c ra9aae16e  
    7272        return loc_service_connect(EXCHANGE_SERIALIZE, id, 0);
    7373}
    74 
    7574void hound_release_session(hound_sess_t *sess)
    7675{
     
    7877                async_hangup(sess);
    7978}
    80 
    8179int hound_register_playback(hound_sess_t *sess, const char *name,
    8280    unsigned channels, unsigned rate, pcm_sample_format_t format,
     
    213211        return ret;
    214212}
    215 
    216 
    217 
    218 
    219 
    220213static void callback_gen(ipc_callid_t iid, ipc_call_t *call, void *arg,
    221214    bool read)
     
    234227                ipc_callid_t id = 0;
    235228                if (!receive(&id, &size)) {
    236                         /* Protocol error */
    237                         cb->cb(cb->arg, NULL, EIO);
     229                        ipc_call_t failed_call;
     230                        async_get_call(&failed_call);
     231                        /* Protocol error or hangup */
     232                        if (IPC_GET_IMETHOD(failed_call) != 0)
     233                                cb->cb(cb->arg, NULL, EIO);
    238234                        free(cb);
    239235                        return;
Note: See TracChangeset for help on using the changeset viewer.