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

Changeset d1c041a in mainline


Ignore:
Timestamp:
2010-12-26T17:35:50Z (11 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master
Children:
a1dc7fe
Parents:
d3a1ade3
Message:

Tear down data connections in async_session_destroy().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/async_sess.c

    rd3a1ade3 rd1c041a  
    146146void async_session_destroy(async_sess_t *sess)
    147147{
     148        conn_node_t *conn;
     149
     150        /* We did not connect the phone so we do not hang it up either. */
    148151        sess->sess_phone = -1;
    149         /* todo */
     152
     153        /* Tear down all data connections. */
     154        while (!list_empty(&sess->conn_head)) {
     155                conn = list_get_instance(sess->conn_head.next, conn_node_t,
     156                    conn_link);
     157
     158                list_remove(&conn->conn_link);
     159                list_remove(&conn->global_link);
     160               
     161                ipc_hangup(conn->data_phone);
     162                free(conn);
     163        }
    150164}
    151165
Note: See TracChangeset for help on using the changeset viewer.