[nanomsg] [PATCH] Fix more list handling issues

  • From: Nir Soffer <nirsof@xxxxxxxxx>
  • To: nanosmg list <nanomsg@xxxxxxxxxxxxx>
  • Date: Sat, 9 Mar 2013 02:08:07 +0200

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.

Attachment: 0001-Fix-more-list-handling-issues.patch
Description: Binary data

Other related posts: