Changeset cc3c27ad in mainline for uspace/lib/hound/src/client.c


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

libhound: Destroy streams on stream_exit

File:
1 edited

Legend:

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

    r03c2d5f rcc3c27ad  
    5555        hound_context_t *context;
    5656} hound_stream_t;
     57
     58static inline hound_stream_t * hound_stream_from_link(link_t *l)
     59{
     60        return l ? list_get_instance(l, hound_stream_t, link) : NULL;
     61}
    5762
    5863typedef struct hound_context {
     
    120125{
    121126        assert(hound);
     127
     128        while (!list_empty(&hound->stream_list)) {
     129                link_t *first = list_first(&hound->stream_list);
     130                hound_stream_t *stream = hound_stream_from_link(first);
     131                hound_stream_destroy(stream);
     132        }
     133
    122134        hound_service_unregister_context(hound->session, hound->id);
    123135        hound_service_disconnect(hound->session);
    124136        free(hound->name);
    125137        free(hound);
    126 }
    127 
    128 int hound_context_enable(hound_context_t *hound)
    129 {
    130         assert(hound);
    131         return ENOTSUP;
    132 }
    133 int hound_context_disable(hound_context_t *hound)
    134 {
    135         assert(hound);
    136         return ENOTSUP;
    137138}
    138139
Note: See TracChangeset for help on using the changeset viewer.