Changeset bbf159a in mainline for uspace/srv/net/tl/tcp/tqueue.c
- Timestamp:
- 2011-12-13T17:06:25Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7a8c1c4e
- Parents:
- 0d29e0cd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tl/tcp/tqueue.c
r0d29e0cd rbbf159a 167 167 log_msg(LVL_DEBUG, "%s: tcp_tqueue_new_data()", conn->name); 168 168 169 fibril_mutex_lock(&conn->snd_buf_lock); 170 169 171 /* Number of free sequence numbers in send window */ 170 172 avail_wnd = (conn->snd_una + conn->snd_wnd) - conn->snd_nxt; … … 176 178 xfer_seqlen); 177 179 178 if (xfer_seqlen == 0) 179 return; 180 if (xfer_seqlen == 0) { 181 fibril_mutex_unlock(&conn->snd_buf_lock); 182 return; 183 } 180 184 181 185 /* XXX Do not always send immediately */ … … 188 192 /* We are sending out FIN */ 189 193 ctrl = CTL_FIN; 190 tcp_conn_fin_sent(conn);191 194 } else { 192 195 ctrl = 0; … … 195 198 seg = tcp_segment_make_data(ctrl, conn->snd_buf, data_size); 196 199 if (seg == NULL) { 200 fibril_mutex_unlock(&conn->snd_buf_lock); 197 201 log_msg(LVL_ERROR, "Memory allocation failure."); 198 202 return; … … 206 210 if (send_fin) 207 211 conn->snd_buf_fin = false; 212 213 fibril_condvar_broadcast(&conn->snd_buf_cv); 214 fibril_mutex_unlock(&conn->snd_buf_lock); 215 216 if (send_fin) 217 tcp_conn_fin_sent(conn); 208 218 209 219 tcp_tqueue_seg(conn, seg);
Note:
See TracChangeset
for help on using the changeset viewer.