~jsvoboda/helenos/dnsr

« back to all changes in this revision

Viewing changes to uspace/srv/net/udp/ucall.c

  • Committer: Jiri Svoboda
  • Date: 2012-08-13 10:40:17 UTC
  • Revision ID: jiri@wiwaxia-20120813104017-t9y6pdrjuky39557
Terminate UDP receive fibril when socket is closed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
104
104
 
105
105
        log_msg(LVL_DEBUG, "%s: udp_uc_receive()", assoc->name);
106
106
        rc = udp_assoc_recv(assoc, &msg, fsock);
 
107
        log_msg(LVL_DEBUG, "udp_assoc_recv -> %d", rc);
107
108
        switch (rc) {
 
109
        case EOK:
 
110
                break;
 
111
        case ECONNABORTED:
 
112
                return UDP_ERESET;
 
113
        default:
 
114
                assert(false);
108
115
        }
109
116
 
110
117
        xfer_size = min(size, msg->data_size);
124
131
void udp_uc_destroy(udp_assoc_t *assoc)
125
132
{
126
133
        log_msg(LVL_DEBUG, "udp_uc_destroy()");
 
134
        udp_assoc_reset(assoc);
127
135
        udp_assoc_remove(assoc);
128
136
        udp_assoc_delete(assoc);
129
137
}
130
138
 
 
139
void udp_uc_reset(udp_assoc_t *assoc)
 
140
{
 
141
        udp_assoc_reset(assoc);
 
142
}
 
143
 
131
144
/**
132
145
 * @}
133
146
 */