From 0d472990e7d3b657f2fc5a4211f5ed8a5e72224a Mon Sep 17 00:00:00 2001
From: Mark Hellegers <mark@firedisk.net>
Date: Sun, 30 Oct 2016 15:30:50 +0000
Subject: [PATCH] Fix #13042: Make sure all cookies are saved
---
src/kits/network/libnetapi/NetworkCookieJar.cpp | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/src/kits/network/libnetapi/NetworkCookieJar.cpp b/src/kits/network/libnetapi/NetworkCookieJar.cpp
index 677cdb2..c94e0a1 100644
a
|
b
|
BNetworkCookieJar::Iterator::NextDomain()
|
603 | 603 | fList = *fIterator->fCookieMapIterator.NextValue(); |
604 | 604 | fList->LockForReading(); |
605 | 605 | |
| 606 | while (fList->CountItems() == 0 && fIterator->fCookieMapIterator.HasNext()) { |
| 607 | // Empty list. Skip it |
| 608 | fList->Unlock(); |
| 609 | fList = *fIterator->fCookieMapIterator.NextValue(); |
| 610 | fList->LockForReading(); |
| 611 | } |
| 612 | |
606 | 613 | fCookieJar->fCookieHashMap->Unlock(); |
607 | 614 | } |
608 | 615 | |
… |
… |
BNetworkCookieJar::Iterator::_FindNext()
|
686 | 693 | fList = *(fIterator->fCookieMapIterator.NextValue()); |
687 | 694 | fList->LockForReading(); |
688 | 695 | |
| 696 | while (fList->CountItems() == 0 && fIterator->fCookieMapIterator.HasNext()) { |
| 697 | // Empty list. Skip it |
| 698 | fList->Unlock(); |
| 699 | fList = *fIterator->fCookieMapIterator.NextValue(); |
| 700 | fList->LockForReading(); |
| 701 | } |
| 702 | |
689 | 703 | fCookieJar->fCookieHashMap->Unlock(); |
690 | 704 | } |
691 | 705 | |