[nanomsg] Re: [PATCH] Fix more list handling issues

  • From: Martin Sustrik <sustrik@xxxxxxxxxx>
  • To: nanomsg@xxxxxxxxxxxxx
  • Date: Sat, 09 Mar 2013 06:04:58 +0100

Hi Nir,

The test module is missing from the patch.

Aside of that, do you have a test case to trigger the timer error you mention? Removal of uninitialised item should not even be attempted. If possible, I would like to have a look at the problem.

Martin

On 09/03/13 01:08, Nir Soffer wrote:
When a nn_list_item is erased from a list, it is set to nil, so the
item owner can check if the item belong to a list.

This change revealed an error in nn_timeout_rm(), trying to remove a
nil list item. Now nn_timeout_rm check the handle before removing it.

nn_timeout_hndl.list was not initialized - now it is initialized in
nn_timer_init(). It would be cleaner in nn_timeout_hndl_init(), but we
don't have that function yet :-).

When list was cleared, list items were not set to nil. Now they are.

Finally, there is now a new test module for the list module.

License: MIT license.



Other related posts: