Commit Graph

48201 Commits

Author SHA1 Message Date
Adrien Destugues
9ce2f7e386 Improve HTTP authentication support.
The authentication state is stored (in a hash map, using the domain+path
as a key) in the UrlContext class. It can then be reused for multiple
requests to the same place. We also lookup stored authentications for
parent directories and stop at the first we find.

Authentication state is not stored on disk (unlike cookies), and there
can only be one for each domain+path.
2013-10-28 17:29:20 +01:00
Adrien Destugues
b7617ddd68 Network Cookie Jar: implement assignment operator.
This change is needed for implementing cookie persistence in Web+ using
the network kit backend.

The current implementation requires the user to unarchive the cookie
jar, then hand it over to the BUrlContext which will copy it to its own
field. This makes the code simpler, but maybe doing a complete copy
(with all the cookies) is an heavy operation and could be avoided.
2013-10-28 17:29:19 +01:00
Ithamar R. Adema
c157484a81 x86_64: fix bootstrap build error
Without this creating the boot symlink fails for the bootstrap build,
as the actual acpi module has not been added.
2013-10-28 15:54:10 +01:00
Ingo Weinhold
fdaba7aaa5 Skip boot device check sum test on CD boot
Whatever we read from the drive in the boot loader isn't what we can
read from the device later, so rather skip the check sum test for
identifying the boot device in the kernel when booting off CD. Fixes
#10147.
2013-10-28 01:18:23 +01:00
Rene Gollent
3fe3603ada Update Vision package. 2013-10-26 19:11:28 -04:00
Axel Dörfler
fd5c87d53c BLooper: removed superfluous locking and code in PostMessage().
* The code duplicated the code found in the BMessenger constructor that
  it called a few lines below. This should improve PostMessage()
  performance a tiny bit.
2013-10-27 00:16:02 +02:00
Siarzhuk Zharski
7f94398c21 TextView:Restore caret offset on B_HOME/B_END in R/O mode
Handling Ctrl-Home / Ctrl-End shortcuts in non-editable mode left the
caret offset unchanged. That provoked stuck of the page scrolling mode.
Reset the caret offset on such actions. Fixes #9407.
2013-10-26 23:02:18 +02:00
François Revol
7cf311823a Fix comments 2013-10-26 21:02:11 +02:00
François Revol
b3025a8642 bootloader: M68K: Fix mmu_free()
Same bug as in ARM code...
2013-10-26 20:54:12 +02:00
François Revol
585830a55e bootloader: M68K: s/KERNEL_BASE/KERNEL_LOAD_BASE/ 2013-10-26 20:54:11 +02:00
François Revol
b086b8ad2d bootloader: ARM: Replace KERNEL_BASE with KERNEL_LOAD_BASE 2013-10-26 20:54:10 +02:00
François Revol
18041782fd bootloader: ARM: Fix mmu_free()
Allocation size was mixed up with page counts...
Allow freeing up to sNextVirtualAddress.
2013-10-26 20:54:00 +02:00
François Revol
9703c9cc30 bootloader: Add tracing to malloc_large() 2013-10-26 18:41:57 +02:00
Julian Harnath
057c8708f2 Move B_MOUSE_IDLE generation to app_server.
* BWindow used to generate the B_MOUSE_IDLE events by sending a
  delayed message with a one-shot BMessageRunner to itself.
  Every creation and deletion of BMessageRunners causes synchronous
  messaging between the application under the mouse cursor and the
  registrar. This creates large amounts of calls to set_port_owner()
  in the kernel whenever moving the mouse.

* Now, B_MOUSE_IDLE is sent by the cursor loop inside the app_server
  instead. When the mouse wasn't moved for the tooltip delay time,
  it inserts a B_MOUSE_IDLE message into the event stream.

* The tooltip delay thus becomes a system-wide constant and is not
  configurable per-application anymore (no code currently in the
  Haiku repo makes use of that anyhow).
2013-10-26 16:11:45 +02:00
Julian Harnath
7f64b301b1 Reduce lock contention in kernel port subsystem.
* Replace ports list mutex with R/W-lock.

* Move team port list protection to separate array of mutexes.
  Relieve contention on sPortsLock by removing Team::port_list from its
  protected items. With this, set_port_owner() only needs to acquire the
  sPortsLock for reading.

* Add another hash table holding the ports by name. Used by find_port()
  so it doesn't have to iterate over the list anymore.

* Use slab-based memory allocator for port messages. sPortQuotaLock was
  acquired on every message send or receive and was thus another point
  of contention. The lock is not necessary anymore.

* Lock for port hashes and Port::lock are no longer locked in a nested
  fashion to reduce chances of blocking other threads.

* Make operations concurrency-safe by adding an atomically accessed
  Port::state which provides linearization points to port creation and
  deletion. Both operations are now divided into logical and physical
  parts, the logical part just updating the state and the physical part
  adding/remove it to/from the port hash and team port list.

* set_port_owner() is the only remaining function which still locks
  Port::lock and one or two of sTeamListLock[] in a nested fashion.
  Since it needs to move the port from one team list to another and
  change Port::owner, there's no way around.

* Ports are now reference counted to make accesses to already-deleted
  ports safe.

* Should fix #8007.
2013-10-26 16:10:03 +02:00
Siarzhuk Zharski
41d5d7c87d StyledEdit:update status view after document was saved 2013-10-26 11:04:30 +02:00
autonielx
f67181338a Update translations from Pootle 2013-10-26 06:17:32 +02:00
Ingo Weinhold
a3a4302bea boot loader heap: Handle large allocations separately
Use platform_{allocate,free}_region() to allocate/free chunks >= 16 KiB.
This reduces the usage of our dedicated (and limited) heap region,
particularly since packagefs makes some larger temporary allocations
while reading the package file. Should fix #10136.
2013-10-26 05:10:16 +02:00
Ingo Weinhold
6ef9697b00 boot loader: packagefs: Fix memory leak on unmount
The PackageNodes weren't destroyed.
2013-10-26 05:03:55 +02:00
Ingo Weinhold
7b1dee3929 boot loader: Fix find_unique_check_sums()
Comparing the complete disk_identifer structure isn't helpful as long as
we don't (can't) compare it in the kernel as well. ATM we only check the
check sums there, so that's what we need to do here as well. This fixes
potential mix-ups when booting off one of multiple equally sized disks.
2013-10-26 02:48:18 +02:00
Ingo Weinhold
63d56be3d9 boot loader: BootVolume::SetTo(): Fix reference counting
We release the reference for fRootDirectory in Unset() but never
acquired one. Fixes crash when selecting a boot volume in the menu.
2013-10-26 01:44:11 +02:00
Ingo Weinhold
3f40dcb6b4 PackageWriterImpl::_AttributeRemoved(): Update string cache
When removing a string attribute, decrement the referenced string's
usage count in the string cache. This fixes the potentially incorrect
usage counts in update mode. Not a serious problem, but it could lead
to only singly (or no longer) used strings to be written to the string
subsection instead of encoding them inline and thus to slightly greater
file sizes.
2013-10-25 22:54:44 +02:00
Ingo Weinhold
c9ed1ea292 PackageWriterImpl: Fix package file heap leak on update
_Init(): In update mode remove the package attributes section and the
TOC section from the package file's heap. We write the updated sections
in Finish(); previously the space for the old sections would be leaked.
This was also the reason why updating haiku_loader would result in a
non-bootable image.
2013-10-25 22:54:44 +02:00
Ingo Weinhold
b8f713e904 PackageReaderImpl: Add public TOC section accessor 2013-10-25 22:54:44 +02:00
Ingo Weinhold
e07b8bd2df package kit: ReaderImplBase: Add public attrs section accessor 2013-10-25 22:54:43 +02:00
Ingo Weinhold
06064b9b4f RangeArray::AddRange(): Fix joining with single subsequent range
When joining with a single range, firstRange would be the same as
RangeAt(endIndex - 1) and we would overwrite its offset field before
getting its end offset, thus possibly resulting in a wrong joined range
size.
2013-10-25 22:54:43 +02:00
Stefano Ceccherini
2be66b5125 Remove unneeded space 2013-10-25 21:42:19 +02:00
Stefano Ceccherini
c29f2d22a9 Close the menu on keypress.
After _InvokeItem(), call QuitTracking() to close the menu.
Incidentally this also seems to fix #9863.
2013-10-25 21:40:13 +02:00
Ingo Weinhold
080ef2e53d package daemon: Fix handling of multiple writable files
When attempting to extract the second writable file from the package,
we noticed that the root directory already existed and assumed
everything had been already extracted. Now we first extract all files
and process them one by one afterwards. Fixes #10131.
2013-10-24 23:13:00 +02:00
Ingo Weinhold
0fea5e936f package daemon: FSUtils::OpenSubDirectory(): Make param const 2013-10-24 23:13:00 +02:00
Ingo Weinhold
a6cf8e1c4e package daemon: Fix error handling of manually added packages
Since we don't move those packages out of the "packages" directory, we
don't want to remove their respective object from the hash tables
either. Fixes #10102.
2013-10-24 23:12:59 +02:00
Adrien Destugues
c52c444c27 Add file: protocol handler. 2013-10-24 17:41:03 +02:00
Adrien Destugues
f6782201f0 Move UrlResult to HttpResult
* Remove the fRawData field, as handling it is too complicated (it's
not easy to have proper copy semantics on a BDataIO) and it's not used
anyway, as the listener DataReceived call is enough to get the data and
handle it.
 * All the remaining fields are HTTP-only, so rename the class to
HttpResult and attach it to HttpRequest instead of UrlRequest.
2013-10-24 17:41:02 +02:00
Jérôme Duval
076952bc29 x86_64: add acpi_battery to the image. 2013-10-24 14:29:51 +02:00
Jérôme Duval
2bd8cdc16b acpi: switch acpi_object from a struct to a union
* this way the size of acpi_object_type matches the size of ACPI_OBJECT
for 32-bit and 64-bit builds.
* adjust users of the type acpi_object_type.
2013-10-24 14:29:47 +02:00
Jérôme Duval
c9cff42225 acpi_battery: code cleanup
* merged acpi_battery.h with the cpp.
* no functional change except the cookie deallocation is now made in
acpi_battery_free() instead of acpi_battery_close().
2013-10-24 14:29:46 +02:00
Jérôme Duval
c1da0e750b acpi_button: cleanup 2013-10-24 14:29:46 +02:00
Jérôme Duval
c5603138e5 random: remove non Haiku code. 2013-10-24 14:29:46 +02:00
Ingo Weinhold
ef5eccf6b3 Add gcc 4 which package 2013-10-24 00:15:15 +02:00
Jérôme Duval
1926af4fde acpi_button: migrated to the new driver API.
* HaikuImage: SYSTEM_ADD_ONS_DRIVERS_POWER is now used for new drivers.
2013-10-23 19:07:22 +02:00
Jérôme Duval
6c1a6532d5 PrintJob.cpp: use MemoryDeleter. 2013-10-22 18:35:40 +02:00
Jérôme Duval
afaeff4cdf x86_64: added acpi_button
* tested OK!
2013-10-22 18:22:40 +02:00
Humdinger
c7e2af25ab Corrected mime_db for HVIF icons
x-vnd.haiku-icon had the wrong BEOS:TYPE and META:TYPE. At least
the META:TYPE is now corresponding to the type I-O-M saves icons.
2013-10-22 18:00:01 +02:00
Ingo Weinhold
df266f1c93 BDaemonClient::CommitTransaction(): Align with documentation
The method is supposed to return B_OK as long as the _result object has
been initialized, even if committing the transaction failed. Fixes the
unhelpful error messages of pkgman when committing the transaction
failed for some reason.
2013-10-22 01:12:02 +02:00
Jérôme Duval
30794c2d79 pci_acpi.cpp: space cleanup 2013-10-21 22:27:18 +02:00
Murai Takashi
004a268e04 Fix dereference of a null pointer
Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2013-10-21 22:22:12 +02:00
Jérôme Duval
ce2d7d5ac8 acpi: use walk_resources to find embedded controller I/O ports.
* export walk_resources and use it
* removed SmallResourceData
* added embedded controller module for x86_64
2013-10-21 22:14:17 +02:00
Adrien Destugues
6c6668ae9e Add friss, sum-it, lha packages
* Also update Caya to provide a deskbar link.
2013-10-21 21:41:34 +02:00
Adrien Destugues
b3d13a000c Network Kit: Coverity scan review and fixes
CID 1108353, 1108335: memory leak.
CID 610473: unused variable.
CID 1108446, 1108433, 1108432, 1108419, 1108400, 991710, 991713, 991712,
	610098, 610097, 610096, 610095: uninitialized field
CID 1108421: unused field

Change the ownership of the result for Url/HttpRequests. The request now
owns its result and you either access it by reference while the request
is live, or copy it to keep it after the request destruction. To help
with that, get BUrlResult copy constructor and assignment operator to
work.

Performance issue: copying the BUrlResult also copies the underlying
BMallocIO data. This should be shared between the BUrlResult objects to
make the copy lighter. The case of BUrlSynchronousRequest is now
particularly inefficient, with at least 2 copies needed to get at the
result.
2013-10-21 09:21:00 +02:00
Rene Gollent
72eb88f5c8 Add non-packaged fonts directory to default image. 2013-10-20 16:06:51 -04:00