Skip to content

Commit

Permalink
Fix a deadlock: there were some LOCKs that should have been UNLOCKs. …
Browse files Browse the repository at this point in the history
…Resolves bug 2794244

svn:r1298
  • Loading branch information
nmathewson committed May 20, 2009
1 parent 66df9da commit 5948429
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Changes in 2.0.2-alpha:
o Change the interface of evbuffer_add_reference so that the cleanup callback gets more information
o Revise the new evbuffer_reserve_space/evbuffer_commit_space() interfaces so that you can use them without causing extraneous copies or leaving gaps in the evbuffer.
o Add a new evbuffer_peek() interface to inspect data in an evbuffer without removing it.
o Fix a deadlock when suspending reads in a bufferevent due to a full buffer. (Spotted by Joachim Bauch.)


Changes in 2.0.1-alpha:
Expand Down
4 changes: 2 additions & 2 deletions bufferevent.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ bufferevent_wm_suspend_read(struct bufferevent *bufev)
bufev->be_ops->disable(bufev, EV_READ);
bufev_private->read_suspended = 1;
}
BEV_LOCK(bufev);
BEV_UNLOCK(bufev);
}

void
Expand All @@ -84,7 +84,7 @@ bufferevent_wm_unsuspend_read(struct bufferevent *bufev)
if (bufev->enabled & EV_READ)
bufev->be_ops->enable(bufev, EV_READ);
}
BEV_LOCK(bufev);
BEV_UNLOCK(bufev);
}

/* Callback to implement watermarks on the input buffer. Only enabled
Expand Down

0 comments on commit 5948429

Please sign in to comment.