Commit Graph

8681 Commits

Author SHA1 Message Date
Fredrik Holmqvist
1f2f3e8c8f Fix for gcc2 hopefully, only have gcc4 here.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38696 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-18 10:07:08 +00:00
Fredrik Holmqvist
8f29d08eba Perhaps telling ACPI that we are in PIC mode might temporarily remedy a few of the irq-related issues.
(This is just until we do proper irq-handling)

On my machines it works either way so I'd like to get feedback on this.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38695 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-18 08:58:58 +00:00
Rene Gollent
4f9892e0f8 Build fix.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38692 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-17 18:21:54 +00:00
Stephan Aßmus
3c0f00c5ec * Theoretically implemented seeking by bytes,
if the input format requires it. Practically,
   it does not work.
 * Implement the new meta-data API.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38686 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-17 08:06:55 +00:00
Clemens Zeidler
d256161aec Calculate a better size limit in a stacking group.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38683 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-17 05:46:13 +00:00
Clemens Zeidler
dcbc4af5d1 - Add size limit changes to the listener interface.
- Update size limit constraints in S&T only if necessary.
- Header style fixes.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38682 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-17 04:04:02 +00:00
Clemens Zeidler
d2cf4da51f Fix min/max size calculation.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38681 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-17 01:10:13 +00:00
Clemens Zeidler
5733bbb94b If the constraints are infeasible don't move the windows because the target positions are not valid. Partially fix #6631.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38680 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-16 22:02:17 +00:00
Stephan Aßmus
8a7cbd8350 Always ignore found index entries after we detect
the stream is building the index on the fly once.
This allows to seek back to earlier positions, since
then the index will contain entries for later in the
stream and the logic to detect auto-generated indices
was broken.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38678 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-16 15:27:16 +00:00
Stephan Aßmus
7b61b6b8e4 Finally: Seeking audio in MKV files works when seeking the
muxer by the "default" stream. When I previously tried this,
I mistakenly remembered AV_TIME_BASE to be 1000, but it's
1000000, the same as the native bigtime_t time representation.
Luckily, we can still set all other streams (including the
"default" stream) to be discarded when obtaining chunks
packets.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38677 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-16 15:13:24 +00:00
Stephan Aßmus
6936b3ba4f Added support for bz2 compressed stuff in Matroska containers.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38674 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-16 13:57:33 +00:00
Stephan Aßmus
51802669a5 Fixed a warning.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38673 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-16 13:56:12 +00:00
Stephan Aßmus
2baccbd9fb Fix retrieving the frame rate for real. Apparently
it can be any of these values, hope the priority is right.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38659 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-15 16:32:44 +00:00
Stephan Aßmus
31879da81c Use the correct field of the AVStream for the video
frame rate (perhaps it changed in 0.6?). This fixes
playback of several MP4 clips I have for testing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38658 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-15 08:35:47 +00:00
Clemens Zeidler
caefa86759 Fix highlighting of the tiling parents.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38657 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-15 05:24:54 +00:00
Stephan Aßmus
5a6b18e914 * Print the performance stats every five frames, and reset
the counters, so it's not the average for the entire
   decoding time, but for the last five frames. This gives
   a more accurate picture of what's going on.
 * Added NOTE about possibly removing the SWS version of the
   colorspace conversion code unless it's used for otherwise
   unsupported conversions. David's code is about 40% faster
   in my tests (nice job!).
 * Free the sws context in NegotiateVideoFormat, if necessary.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38651 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-14 18:43:58 +00:00
Alex Wilson
361babfb26 Update ICO Translator to use the Layout API. Fixes #6525
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38648 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-14 18:22:14 +00:00
Stephan Aßmus
5021eb2421 Removed the "native" ogg, vorbis, theora and speex plugins in favor
of support for these codecs and demuxer in the FFmpeg plugin. The
ogg test streams I downloaded play fine now. For example, Big Buck Bunny
would play without video before and ogg files natively encoded with the
FFmpeg plugin wouldn't play at all. Since the removed plugins were not
maintained and were based on external libs themselves, I didn't see the
point in keeping them.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38646 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-14 12:32:04 +00:00
Stephan Aßmus
594039f10d Imported libspeex 1.2rc1 for use in libavcodec's libspeexdec.c.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38645 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-14 12:24:09 +00:00
Clemens Zeidler
727c8ba2c9 Improve min constraints and add max constraints, not perfect yet but much better then before.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38643 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-14 05:23:05 +00:00
Stephan Aßmus
73e5249c79 * Enabled libvorbis and libtheora encoders in FFmpeg
* Enabled ogg muxer in MuxerTable.

ogg/vorbis creation successfully tested with MediaConverter.
ogg/theora needs more testing, it seems to work, but I need
to switch from the other vorbis/theora/ogg plugins to the
FFmpeg built-in support, otherwise the current theora stream
is not supported by the old plugin.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38641 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-13 20:25:24 +00:00
Stephan Aßmus
0640823932 Added libtheora 1.1.1 into FFmpeg folder as libtheora_ffmpeg.a
in order not to clash with the old libtheora in the theora plugin.
x86 CPU optimizations are only compiled for GCC4.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38640 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-13 20:23:08 +00:00
Stephan Aßmus
d45314ec30 Added libvorbis 1.3.1 into FFmpeg plugin folder. Target name is libvorbis_ffmpeg.a
in order not to clash with the old libvorbis in the vorbis plugin. I plan to remove
that one after I've done more testing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38639 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-13 20:21:08 +00:00
Stephan Aßmus
611ab2d824 Added libogg 1.2.0 into FFmpeg plugin folder.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38638 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-13 20:18:06 +00:00
Stephan Aßmus
bc04b5141e Disable float_to_int16_interleave_sse2 in favor of
float_to_int16_interleave_sse, since it crashes for reasons
I would have no clue about. Fixes a few duplicated tickets,
which I'll have to sort out later.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38636 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-13 18:27:49 +00:00
Stephan Aßmus
5393fabac1 Disable some annoying debug output.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38635 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-13 16:19:07 +00:00
Stephan Aßmus
0b1bbe06ac Small coding style fix.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38634 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-13 16:02:52 +00:00
Clemens Zeidler
40c0ae4804 Only search for new snapping parents if there is also a snapping candidate. Thanks Humdinger for finding this bug.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38625 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-12 22:40:08 +00:00
Matt Madia
a0077c2456 Patch by idefix: Add support for five different Bamboo devices. Closes #6108.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38615 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-12 12:42:17 +00:00
Matt Madia
de456baf0e Patch by michaelvoliveira: Add detection/support for
Nvidia Geforce 7025 / nForce 630a. Fixes #6557.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38614 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-12 12:35:01 +00:00
Fredrik Holmqvist
26c1992a9a Patch by saivert to fix the vmware mouse issues in #6576.
The changes looks reasonable, although I don't have VMWare to test with.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38602 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-11 07:20:11 +00:00
Jérôme Duval
55217ad3ed Patch from Janito: fix the copyright for files highly based on BFS.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38601 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-10 18:47:38 +00:00
Jérôme Duval
bcbde9ce94 added missing ppc and arm files
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38593 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-09 19:55:09 +00:00
Fredrik Holmqvist
01f964efeb Introduce a gSystemShutdown flag to be able to check if system is shutting down. ACPI Embedded Controller now uses polling when it is set to true.
This might help with ACPI shutdown issues, if not this change can be reverted. Not verified as it works on all my machines even without this.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38585 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-08 19:19:49 +00:00
Philippe Houdoin
33684c664b Removed swscale_altivec_templace.c, which is already conditionaly included
by swscale_templace.c, itself included by swscale.c.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38583 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-08 15:12:00 +00:00
Philippe Houdoin
f7fdea9640 Removed duplicate int_altivec.c and h264_templace_altivec.c, which as any templace
source are instead conditionally included by other source code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38582 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-08 15:07:16 +00:00
Philippe Houdoin
05b9aa91c6 No more imgresample_altivec.c or snow_altivec.c in ffmpeg v0.6.
Add the new vp3dsp_altivec.c, though.
Should fix the ppc build.

*Untested*


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38581 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-08 14:46:48 +00:00
Jérôme Duval
a1b0ec3097 Patch from Janito Ferreira Filho (aka jjvf): this is the result of his GSoC assignment "Implement ext2/3 Read and Write Support for Haiku".
* Tested and checked most features and fs operations, while passing successfully the Linux fsck. Though the implementation still needs more testing and is to be used with 
caution, it's better in my mind to have the code committed now given the size of the patch.
* Code style isn't extensively checked but is mostly OK. Code review is welcome.
Some notes from Janito:
* Sparse files aren't supported and hard links aren't supported. Write attributes methods aren't activated nor tested.
* Journaling needs more testing to make sure it behaves in a compatible way to Ext3, and support for the different modes hasn't been implemented (due to the block 
and file cache incompatibility). Correct revoke management is also lacking, as is proper management of the superblock state and copies and block group copies.
* The code is partly based and inspired by the BFS implementation. Author information might need to be fixed.

I'd like to congratulate and thank Janito for his hard work to bring the implementation to the current state. I hope he'll keep on maintaining it and become a regular 
contributor/committer.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38573 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-07 23:25:42 +00:00
Clemens Zeidler
3ef84cd4bb Check if the mouse click is in the decorator drag area.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38572 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-07 21:27:13 +00:00
François Revol
a7ea5b51c6 Force grep to treat files as text files, as it seems freegrep doesn't like UTF-8.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38571 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-07 16:39:23 +00:00
Stephan Aßmus
fae87f406e Make CpuCapabilities.h self-contained and thereby fix the build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38565 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-07 12:12:07 +00:00
Stephan Aßmus
86358cb106 * Hopefully fixed the PPC build.
* Fixed coding style issues.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38564 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-07 11:22:02 +00:00
Stephan Aßmus
20d496c56c ff_x264_deblock_v8_luma_intra_mmxext is GPL and needs to be wrapped
in a CONFIG_GPL #ifdef (should be upstreamed, actually). This fixes
the GCC2 build (and probably GCC4) if the Haiku build is not configured
to include GPL add-ons.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38563 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-07 11:15:48 +00:00
Stephan Aßmus
5e7287f481 Enable run-time CPU detection. I didn't yet test this
on an older CPU.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38562 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-07 11:11:51 +00:00
Stephan Aßmus
6c49058008 yuv2rgb_mmx.c will now include other files depending on whether
GPL code is enabled or not. We need to build it in either case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38561 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-07 11:10:57 +00:00
Stephan Aßmus
6f76655240 Fixed build with tracing enabled.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38560 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-07 11:09:48 +00:00
Stephan Aßmus
d29fcc50b8 Switched support for AVI files from native Reader to
FFmpeg plugin, which now works for much more files
in my testings.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38556 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-06 21:23:39 +00:00
Stephan Aßmus
f2d6b67836 Disable some MMX accelerated functions on the GCC2 build, those
had been patched in the older ffmpeg version as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38555 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-06 21:14:22 +00:00
Stephan Aßmus
fb0c01f4d9 GCC2 was seeing the wrong "internal.h" header. That's what you get for not
using vendor branches properly... I remember having to make this change
before... GCC2 build goes much further now, investigating next problem.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38554 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-06 21:06:28 +00:00
Jérôme Duval
d859486b15 Only swap words on little endian machines. Checked against FreeBSD.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38552 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-06 19:24:02 +00:00
Stephan Aßmus
8887a47ded Upgraded FFmpeg to the release version 0.6 (only some minor compile fixes to the code
with regards to using the wrong #include scope in one file and disabling two
apparently unmaintained asserts when compiling in DEBUG mode). I didn't yet test
the GCC 2 build, but I need to get this into SVN since I am having some annoying
file corruption troubles. In fact I am hoping I am not commiting broken files,
but a few seconds ago everything was still building cleanly. One thing that definitely
improved is the (disabled at the moment) AVI support. Every clip I tested so far
plays, which can't be said about our native AVI reader. With the previous FFmpeg
version (a random SVN revision is my guess), many old AVIs played completely broken.
So far, I have not spotted any regressions


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38548 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-06 19:01:50 +00:00
Jérôme Duval
995b475caf Patch from dachaac (bug #4813): Fix ATA vendor and product strings according to ATA string conventions. Thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38547 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-06 18:53:47 +00:00
Stephan Aßmus
af4608b687 Fixed warning.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38546 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-06 18:45:48 +00:00
Stephan Aßmus
1fc294b86a * Do not use an I/O buffer which is allocated with a StreamCookie
object. Demuxers may actually resize the I/O context buffer,
   which would corrupt memory. This is certainly the case in FFmpeg
   0.6, don't know if it was a problem before.
 * Do not set the time to the packet PTS in Seek(), if it's the magic
   value for "no PTS".
 * Don't regard the AVInputFormat flags (generic index), we can detect
   this more reliably by the observed behavior: Don't trust the found
   keyframe if we are obvioulsy building the keyframe index on the fly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38545 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-06 18:45:05 +00:00
Stephan Aßmus
9abb7d4713 Remove the Matroska reader from the image and enable
Matroska support in the FFmpeg plugin. I have a few streams
to test with, most didn't play right with the Matroska reader,
many simply crash. With the FFmpeg matroska support, most files
do play fine. Seeking the audio stream is a problem, in that
the FFmpeg code does not build the index for the audio stream,
and so seeking always falls back to regions of the file that
have already played. The audio will catch up eventually and
playback will be fine again. A minority of files I could test
with don't work right, those seem all to be older files.
Overall, the support for Matroska files has much improved
with this commit. I am still investigating why FFplay has
no trouble seeking in mkv files, while the FFmpeg plugin only
seeks perfectly in video streams. It may be a problem that
the FFmpeg plugin uses completely separate AVFormatContexts
for each stream, which on the other hand allows to seek BMediaTracks
independently from each other and resolves concurrency issues.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38541 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-06 09:50:24 +00:00
Stephan Aßmus
3e9336fd20 * Small coding style fixes and improved naming
of the thread related methods.
 * Explicitely reset the fThread member in
   _StopOutputThread().
 * Added TODO about the somewhat seemingly fragile method
   to ensure the previous buffer for a channel has
   been processed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38527 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-04 10:41:12 +00:00
Stephan Aßmus
b79d094ee0 With many AC3 streams in AVIs I have, the FFmpeg AC3 codec
crashes. In some MKVs I have, the FFmpeg implementation
behaves badly when the stream switches from stereo to 6-channel
(weird, but can apparently happen). So simply don't claim
support for AC3, since we have a "native" AC3 decoder which
works much better.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38524 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-03 12:16:21 +00:00
Clemens Zeidler
8875d8af63 Tune parameter and fix a comment.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38518 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-03 04:49:56 +00:00
Clemens Zeidler
a6771397dc Store the stacking order to restore it if a window changed its layer position.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38517 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-03 03:55:29 +00:00
Clemens Zeidler
7fe05355e3 Also manage a list of all areas in a group.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38516 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-03 00:34:54 +00:00
Clemens Zeidler
d4bbf5c221 Clean up.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38515 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-02 23:58:26 +00:00
Clemens Zeidler
743d974099 Floor the tabLength to avoid drawing bugs. Add the leftover of this cutting to the last tab.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38511 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-02 03:51:29 +00:00
Clemens Zeidler
af89e8106a Remove unused function.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38510 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-02 03:30:14 +00:00
Clemens Zeidler
d344b03a93 Ensure that the window is in the front when using focus follow mouse.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38509 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-02 03:10:55 +00:00
Clemens Zeidler
04674450ad - Do the window layout on every resize. This is e.g. needed to do the tab layout.
- Use old ActivateWindow implementation till the Desktop SendBehind question is solved.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38508 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-02 03:05:58 +00:00
Stephan Aßmus
dc24f85691 Use rounding to avoid the situation, that FindKeyFrame()
returns a frame, and using that very same frame again
for FindKeyFrame() returns a different frame, because
the rounding effects have converted the time to be smaller
than the timestamp that was found for the first call to
FindKeyFrame(). It still happens sometimes, but a lot less
frequently. Ideas appreciated. :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38504 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-01 21:39:04 +00:00
Stephan Aßmus
1a2e8aeeaf Fixed warning.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38500 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-01 17:53:00 +00:00
Stephan Aßmus
b4560be299 * Found two more places where _ConvertFromStreamTimeBase()
could be used.
 * Finding keyframes is unreliable. Sometimes the index
   is built on the fly, without us knowing. The file will
   become seekable after we have decoded those parts.
   This however means that seeking may not have been successful.
   To know the seeked to frame, we extract the next packet
   and returned the true current frame in the in/out arguments
   to seek.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38497 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-01 15:58:22 +00:00
Stephan Aßmus
b4a9b7c236 * Actually use the client suggested buffer size.
* When the client didn't suggest it, take the sample
   size into account.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38494 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-01 14:51:37 +00:00
Stephan Aßmus
2c1e15255e * Initialize the channel mask of the media_format.
* Enabled the DTS decoder. The codec tag is fake,
   but as long as Readers use this, it will work.
   Currently only works with the FFmpeg reader, though,
   and I tested only with matroska containers.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38493 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-01 14:50:43 +00:00
Stephan Aßmus
b006bbe130 * Resolved TODO and implemented updating resampling implementation on the fly.
* Reordered some methods in the source to align with declaration order.
 * Applied naming conventions for private methods.
 * Switched asterix style in MixerInput.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38488 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-01 09:09:10 +00:00
Clemens Zeidler
e9ec3d5a49 In stack mode, draw the zoom button if the window is active otherwise use the space to draw the title. The idea to draw one zoom button at the rightmost tab does not work because in focus follow mouse mode the particular tab may loose the focus when move the mouse to the zoom button.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38487 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-01 04:09:08 +00:00
Stephan Aßmus
a79b30c3b6 * In the MixerInput, also use the Linear resampler if requested by the
settings. (There is a common "mixing frame rate" to which all inputs
   resample, before the MixerCore resamples to the frame rate of the
   output.)
 * Some more coding style fixes in MixerCore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38479 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-31 16:07:52 +00:00
Clemens Zeidler
cb2fa7e665 Coding style.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38476 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-31 05:42:18 +00:00
Clemens Zeidler
26152d9e07 - Increase max size for stacked tabs.
- Use more title space in stacked tabs.
- Fix tab movement in stacked mode.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38475 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-31 05:36:09 +00:00
Clemens Zeidler
fef53dfffd When activating one window in a group send all other windows behind this window and not activate them. This fix flickering of stacked windows.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38474 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-31 02:07:15 +00:00
Stephan Aßmus
eb01f516a3 The CodecID for raw-audio actually depends on the sample format
and can't be hard-coded in the EncoderTable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38464 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 21:04:29 +00:00
Axel Dörfler
f097f90c70 * Fixed a bug in deciding whether or not an IP level broadcast should be
accepted. This should have been the reason for Duggan's problem with DHCP
  as part of bug #6454.
* Stippi's router seems to answer DHCP requests with broadcasts to the future
  broadcast IP address. Luckily, it's also a link layer broadcast, so we let
  the upper protocols decide what to do with it, depending on that; this could
  also be done depending on the existence of any unconfigured networks.
* This should fix Stippi's DHCP problems, and therefore bug #6454 - in any
  case, this will be the last try before my vacation :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38450 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 14:58:08 +00:00
Stephan Aßmus
b543dbc293 Honor 80 chars/line limit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38448 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 13:02:48 +00:00
Stephan Aßmus
a6e0f877c3 Print the debug output only for the first channel,
more channels don't add more information.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38447 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 13:01:44 +00:00
Stephan Aßmus
4cc71346c4 Fixed more coding style violations.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38446 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 11:36:02 +00:00
Stephan Aßmus
cb7b1a3cee Fixed DEBUG build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38443 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 11:29:26 +00:00
Stephan Aßmus
c21a83bb46 A few more coding style fixes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38442 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 10:21:25 +00:00
Stephan Aßmus
0960b6d0f1 Fixed more coding style errors.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38441 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 10:20:05 +00:00
Axel Dörfler
1e2c72fcfc * FindAttribute() was broken and would find partial names (ie. if an attribute
with the name "abc" existed, it would be returned when opening any attribute
  starting with "abc".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38432 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-29 21:34:35 +00:00
Axel Dörfler
001d7548ab * Style cleanup, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38430 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-29 21:25:12 +00:00
Axel Dörfler
977f0426ee * Fixed CID 1508: a corrupted rockridge entry could cause a kernel panic.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38429 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-29 21:12:35 +00:00
Axel Dörfler
1216557e1b * iso9660_volume::volSetIDString[] should have been 129 bytes in size, not 29.
This fixes (a harmless) out of bounds array access, and CID 1359.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38423 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-28 17:03:47 +00:00
Axel Dörfler
d2a6c05145 * Removed superfluous check, and fixed wrong indentation. This also closes
CID 1510.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38422 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-28 16:55:57 +00:00
Axel Dörfler
6195b696db * Added missing destructor; fString was leaked. This fixes CIDs 1411-1413.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38421 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-28 16:50:26 +00:00
Axel Dörfler
44260788fe * Fixed CID 1650: the "raw" buffer could be leaked.
* Automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38420 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-28 16:46:18 +00:00
Axel Dörfler
8d797bda1d * Fixed CIDs 1503 & 2054: dereferenced {record|playback}_stream which could be
NULL.
* Fixed an operator precedence bug (&), and added the (() != 0) everywhere.
* Minor cleanup.
* Automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38417 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-28 14:52:22 +00:00
Axel Dörfler
be136723e7 * Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38416 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-28 14:35:48 +00:00
Axel Dörfler
da0d740954 * Fixed broken UDP for non device bound sockets.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38415 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-28 10:41:57 +00:00
Adrien Destugues
355a38a098 Fix gcc4 build as well as logic error : the driver needlessly scanned some devices.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38413 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-28 09:35:15 +00:00
Adrien Destugues
18900042ce * Use defines for the SCSI commands instead of the numeric opcode directly
* Colorize the trace output for easier syslog reading
 * Add usb_floppy to the default image
 * disable error tracing


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38411 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-28 08:57:29 +00:00
Adrien Destugues
68f54d50f2 Better error handling : do not enter an endless loop in cases of errors, but report them to the caller.
Note this leads to KDL if there is a write error, so it may not be the best way for a floppy...

This allows the driver to uninitialize properly when all devices are unplugged, which in turns permits updating the driver without rebooting to unload it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38410 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-27 22:02:24 +00:00
Axel Dörfler
46af4e7787 * Fixed CID 566 that was duplicated in blue_screen.cpp as well (but was not
discovered by Coverity for some reason): commands without arguments would
  overwrite memory (in this case the sConsole::arg_count only, though).
* Travis's copyright was missing in blue_screen.cpp.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38409 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-27 21:36:07 +00:00
Axel Dörfler
882d595fc0 * If an unknown type is encountered, return immediately. This fixes CID 1504.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38408 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-27 21:10:14 +00:00
Adrien Destugues
0a240bcefe Replace icon for the usb_floppy devices.
The floppy icon is based on zumi's one. changes done :
 * I made the floppy a bit thinner, it looked more like a zip100 cartridge
 * I added an USB logo (or something that more or less looks like one) on the floppy label
 * The logo only shows at big icon sizes since I couldn't get it looking good at small ones.

Feel free to improve.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38407 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-27 21:00:17 +00:00
Adrien Destugues
a046d61f81 * Write operation data direction is obviously host-to-device
* Write operation will always return an error, one needs to send request sense until the write is actually done.
This gets floppy writing working.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38406 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-27 20:17:12 +00:00
Adrien Destugues
027fabed60 Use block read and block write instead of regular read and write commands. Mounting the device read-only now works. Writing
is still not working.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38405 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-27 17:54:04 +00:00
Adrien Destugues
87bfae8987 A floppy drive is a slow device, so we have to try many times before getting a result.
This gets read capaity working, the device shows up in drivesetup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38404 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-27 17:33:54 +00:00
Stephan Aßmus
e9a09f6670 * Enabled the mp2/mp3 decoder in the ffmpeg plug-in (CodecTable.h).
* Removed the mp3_reader and mp3_decoder from the image and from
   the source tree even. The mpeg123lib based decoder was crashy,
   since the lib didn't cope with bad input data too well, whatever
   the reason, but bad input can also be a specially crafted file.
   I didn't see the value in keeping two decoders around that use
   a third party library as backend. While reading in the mp3_decoder
   code, I even saw that it used global variables in the mpeg123 lib
   to figure out framerate and channel count, after decoding a bit of
   input. Obviously this has concurrency issues.
 * Removed the mp4_reader from the image. It is native code, and should
   perhaps be preferred over imported code, but I don't have the
   resources to look into it, and David doesn't seem to have the time
   either. There are basically three types of problems with the
   native mp4 reader: 1) It is way too CPU intensive. I have many HD
   files that don't play at all, since there is not enough time left
   for actual decoding. 2) Seeking leaves a lot of visual artifacts
   (with the very same decoder plug-in), since there seems something
   wrong either with finding true keyframes, or with flushing buffers
   correctly. And 3) very often audio stops working at all after
   seeking. Sometimes a keyframe is returned for audio which is very
   far away from the wanted frame, which currently triggers bad
   behavior in the audio producer node in MediaPlayer and can even
   crash the media_addon_server. With the ffmpeg based mp4 reader,
   none of these problems exist: Seeking is perfect, no artifacts,
   CPU load is low enough for pretty much all HD clips I tested with,
   and audio always works and is always in perfect sync with the video
   after seeking.

If there are regressions after this commit at all (I tested a lot of
files), then I anticipate only that the ffmpeg plugin does not advertise
support for files it could actually handle (i.e. easily fixable). In
those cases hopefully a test stream can be made available. If the
native mp4 reader is improved to the point that it works as well as
the ffmpeg mp4 demuxer, we can easily switch it back, but for now, users
will prefer reliable playback.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38403 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-27 17:16:00 +00:00
Adrien Destugues
779ccf5c6d * Properly initialize the drive before attempting to access it
* Ask the drive for its status after each command we send, or else it locks up
THis get us as far as trying to read the drive capacity, but this still fails for some reason.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38402 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-27 17:00:57 +00:00
Stephan Aßmus
22ce5d9517 * Optionally separate tracing output for FindKeyFrame().
* Output more information in AVFormatReader::StreamCookie::Open(),
   AVInputFormat flags for example.
 * Added CODEC_ID_AAC handling when codecTag is 0. Adds support
   for AAC in Matroska containers when the ffmpeg plugin is enabled
   to handle those.
 * Added some rounding to frame<->time conversions.
 * AVFormatReader::StreamCookie::Seek() forgot to pass the seek
   flags to av_seek_frame().
 * The most important fix is this, though: There are formats which
   build the keyframe index on the fly, while parsing the stream!!
   These means we can only seek to real keyframes for parts of the
   stream that has already been decoded. Handle this situation by
   assuming we can seek to the requested frame/time. This change
   fixes the use of the AVFormatReader as MP3 reader.
 * Anothe important fix is to ignore the nb_frames member of the
   stream for the total frame count. This makes MP4 movies
   also work perfectly now when the AVFormatReader is used for them.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38401 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-27 13:29:52 +00:00
Stephan Aßmus
d5479a3bd0 * Use the new avcodec_decode_audio3() call, avcodec_decode_audio2()
gives the deprecated warning... We need to cache an AVPacket for this.
 * Check the allocation of fOutputBuffer.
 * When seeking, we need to flush the already decoded stuff
   in fOutputBuffer, and throw away the last chunk buffer as well.
 * Handle an incomplete input format at least to the point of not
   crashing with a divide error (mp3_reader would give us such an
   incomplete format for example).
 * _DecodeAudio():
   - Fixed some edge cases in the audio decoding loop: avcodec_decode_audio3()
     can return a 0 length, which means no error, but no decoded frames
     either. ffplay throws away the chunk in this case, do the same.
  - Convert some invalid situations that were printf()s into debugger()s.
  - Add much more comments to explain how everything works.
 * Fixed the occasional coding style issue.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38400 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-27 13:21:03 +00:00
Adrien Destugues
156a187d0d * Fix test unit ready command (the device still stall, no idea why).
* Move the interrupt stuff inside the device structure
 * Some cleanup, added some more tracing fordebug purposes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38399 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-27 12:40:05 +00:00
Axel Dörfler
bbbb5592e4 * UDP now respects the net_socket::bound_to_device field when propagating data
to endpoints. This should help with the final issues of bug #6454.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38397 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-27 11:05:13 +00:00
Axel Dörfler
c993531c60 * Fixed GCC4 only error.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38396 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-27 10:57:03 +00:00
Axel Dörfler
89bf19ccde * Made an uint32 out of net_socket::bound_to_device.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38395 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-27 10:56:41 +00:00
Axel Dörfler
cf064cc7b5 * Set the new net_buffer::index field on retrieval of a buffer.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38394 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-27 10:55:48 +00:00
Axel Dörfler
870fd4b77b * Removed radix.c from the build, as it's not currently used.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38393 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-27 10:54:58 +00:00
Axel Dörfler
8402e1f46d * Now sets the net_buffer::index field before forwarding a buffer to the next
layer.
* Converted the hash used to the BOpenHashTable instead of khash.
* Fixed remaining GCC4 warnings.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38391 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-27 10:51:39 +00:00
Stephan Aßmus
ff1679bee8 * Improved some comments.
* When writing encoded audio, we were leaking one
   temporary buffer per chunk.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38388 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-27 10:32:18 +00:00
Axel Dörfler
1e4feb533e * Added some optional debug output.
* Check for errors using != instead of < - the functions are not supposed to
  return anything above B_OK.
* Use the stack-wide ENABLE_DEBUGGER_COMMANDS instead of our own local solution.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38386 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-27 07:32:41 +00:00
Adrien Destugues
bbdb55154d Work In Progress (do not try yet!) driver for usb floppy drive.
This is loosely based on usb_disk, but uses a different protocol for sending the commands.
Refactoring is unfinished, so don't look at the style too muh, it will e fixed and cleaned up later.

Basic communication with the drive works (sending commands). Command themselves still mostly untested.
Command Blocks sent to the drive are most likely wrong and may erase your floppies or do any other weird things!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38379 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-26 20:28:54 +00:00
Axel Dörfler
93e784a576 * Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38377 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-26 14:32:14 +00:00
Adrien Destugues
c1b432af8e Fix build with tracing enabled.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38371 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-26 12:43:44 +00:00
Axel Dörfler
f16be37f87 * Fixed strange/wrong indentation.
* Made sure the 80 character per line limit is honoured.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38370 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-26 12:36:52 +00:00
Axel Dörfler
9d4331902c * Now we should also support link layer and INADDR_BROADCAST broadcasts again
correctly.
* This should finally fix ticket #6454, but I keep it open until it's confirmed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38365 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-26 09:23:49 +00:00
Adrien Destugues
a8a33a98ff Intel_extreme now centers the screen when one select a resolution smaller than the ne of the LVDS panel.
Also clean up the style and add some more TODOs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38363 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-26 09:13:41 +00:00
Clemens Zeidler
ccaae539b4 Call the correct method to minimize/activate a window. Previously the BWindow got out of sync and activation of a window haven't worked probably.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38359 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-25 21:22:26 +00:00
Axel Dörfler
4c6e53f601 * IPv4 must always set the net_buffer::interface_address on incoming buffers; it
didn't do that for broadcasts - this is still not a full solution as it won't
  work for link layer broadcasts, but this should fix most DHCP problems.
* IPv4 multicast doesn't do that yet.
* Only send ICMP errors if it hasn't been a link layer broadcast.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38356 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-25 15:54:35 +00:00
Axel Dörfler
cb99c9153b * The KDL command "udp_endpoints" did not work anymore, since
DatagramSocket::AvailableData() locks; introduced a UdpEndpoint::Dump() method
  to work around that.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38355 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-25 15:51:43 +00:00
Adrien Destugues
124a502a7a Always set the LVDS panel to its native mode, except for the 'display' part.
This allows to use lower resolution screen modes with black border.

Added a set of TODOs :
 * The smaller scren is not centered, but aligned top-left
 * The base resolution used is the one reported from edid 1.1, because I'm still not sure how to parse EDID 1.2. This resolution is too small on my laptop, but it works.

Also added two ways of setting 8-to-6 dithering for 18-bit LVDS panel. No visible result for me, unfortunately.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38354 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-25 15:06:49 +00:00
Axel Dörfler
d401ca7b98 * Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38350 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-25 10:04:01 +00:00
Adrien Destugues
0405fd3b15 Set the color depth for head B. This allows using 8,15, and 16-bit modes on lvds panels.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38349 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-25 09:46:48 +00:00
Andreas Färber
424f57123c pci: Fix memory leaks in uninorth (ppc)
The future cookie was leaked in three of four error scenarios.

Backported from grackle.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38345 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-24 22:58:08 +00:00
Andreas Färber
6ed10d93ed pci: Implement probing and config r/w for grackle
Based on Motorola MPC106 User Manual and NetBSD's
src/sys/arch/macppc/pci/grackle.c 1.11. The MPC106 apparently deviates by
requiring the E (enable) bit set to 1 for config read/write to work.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38344 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-24 22:48:51 +00:00
Stephan Aßmus
303ecf89ec There was some bogus code in the Seek and FindKeyframe methods:
First B_MEDIA_SEEK_TO_FRAME was handled to compute a time, then
it was ignored and frame was used as time stamp. Also the
conversion from frame to time had the num and den members of
the time base swapped in the computation, so it computed
bogus time stamps. Refactored the conversion methods, always
seek based on the time. Needs more testing (perhaps there are rounding
issues), but overriding a lot of native reader implementations with
AVFormatReader holds up very well now with a lot of files I tested.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38332 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-24 13:57:40 +00:00
Adrien Destugues
0767bd3a8b Use the EDID info from LVDS panels :
* Read the EDID info on both port A (analog VGA monitor) and C (LVDS panel)
 * If an LVDS panel is detected, report the EDID resolutions instead of the BIOs settings

This fixes #6326, likely #5096, and possibly some others intel_extreme problems. Please test.
On the other hand, this make the screen preflet show the full list of more reported by the LVDS panel. As we don't support 
scaling, some of these modes are unuseable and lead to a garbled screen.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38329 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-24 11:06:50 +00:00
Jérôme Duval
b2c38f748a Fixed #5839: Return ENOENT in case ntfs_attr_open() returns NULL.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38324 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-23 19:59:39 +00:00
Andreas Färber
b5bc8fc8ab pci: Add stub support for grackle (ppc)
A grackle-compatible Motorola MPC106 PCI controller can be found in the
PowerMac G3 (ticket #6247). For now just let the user know.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38323 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-23 19:11:46 +00:00
Clemens Zeidler
1da17f129a Clean up.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38314 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-23 06:39:47 +00:00
Clemens Zeidler
7d69f43e9f - Update the size constraints when a window has been resized.
- Remove superflouse and wrong SetRange.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38313 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-23 06:27:08 +00:00
Andreas Färber
58782ca147 pci: Fix line endings of ppc code
No functional changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38295 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-21 14:47:38 +00:00
Ingo Weinhold
8e192dad09 Fixed build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38290 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-20 20:42:33 +00:00
Fredrik Holmqvist
d7b1a83fc3 Add get_current_resources call to ACPI module which allows us to read out a device current resources.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38288 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-20 19:23:33 +00:00
Clemens Zeidler
668e181957 Move constraint solving to the rest of the constraint stuff. Only adjust windows if specifications are feasible.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38285 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-20 02:21:34 +00:00
Oliver Tappe
258b762aef * fix a warning in the wonderbrush translator which I think indicates an actual
problem (since + binds stronger than >>)
Stephan: please review, esp since I don't know how to test this!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38279 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-19 19:40:15 +00:00
Oliver Tappe
36947c7bf0 * style adjustments - no functional change
Stephan: please yell if you dislike the formatting of the large expressions now

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38278 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-19 19:33:54 +00:00
Oliver Tappe
269ebc04b9 Fix #6373, second try
* make BDADDR_* macros refer to value types instead of addresses
* adjust all interfaces using bdaddr_t* to use (mostly const) refs instead,
  which IMHO makes the interface & code clearer
* that got rid of a couple of const incorrectness casts
* some cleanup along the way


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38265 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-19 15:29:02 +00:00
Oliver Tappe
32a2294fdc * revert r38213, as it introduces initialization problems
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38263 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-19 14:40:17 +00:00
Andreas Färber
04e09d1be8 shortcut_catcher: Suppress #pragma export
Fix some more #pragma export warnings treated as errors on ppc.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38258 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-19 00:24:09 +00:00
Clemens Zeidler
de8a0836ac Fix coding style.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38219 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-17 23:48:47 +00:00
Oliver Tappe
e0ef64750f * fix #6373 by switching the BD... macros to take the address of corresponding
constants, which had to be defined in several places in order to be available
  in the kernel addons, network protocols and the server/kit.
* enable -Werror for all servers

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38213 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-17 21:46:32 +00:00
Axel Dörfler
0f274fd5b2 * Calmed down CID 1976; the problematic situation should not be able to occur,
but I've changed it anyway to make the code clearer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38206 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-17 18:22:17 +00:00
Axel Dörfler
ed64d4e0f5 * Fixed CID 1511: protocol could be NULL.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38193 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-17 15:34:24 +00:00
Axel Dörfler
579e19f5b9 * Fixed CID 1703: buffer could be leaked. Thanks to Stefano for the note.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38191 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-17 15:21:39 +00:00
Adrien Destugues
f7502de1bb Look for catkeys files with .catkeys extension instead of .txt, since that's what everyone uses.
It makes it easier and less confusing to test catalogs without linking them.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38183 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-17 13:49:52 +00:00
Axel Dörfler
3f7e748f91 * Made the code a bit more robust against faulty use.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38181 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-17 11:45:56 +00:00
Axel Dörfler
ed18d7cf71 * Initialized the domain_datalink's first_{protocol|info} members. This fixes
the crashing bug reported by Atis when trying to add an interface which fails
  (the bug causing this has already been fixed with the previous commit).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38180 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-17 11:45:26 +00:00
Axel Dörfler
75b83073c2 * Getting an address leaked a reference. This fixes that interfaces could not
really be deleted (a reference of them was kept in memory).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38179 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-17 11:43:22 +00:00
Axel Dörfler
7e046eab3b * UDP really wanted to make sure that the error buffer was freed, and just did
it once more. This should be the final nail on bug #6446.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38178 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-17 09:51:22 +00:00
Clemens Zeidler
19f43b9f6a SATDecorator implements event handling and handles the stacking api requests.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38170 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-17 06:41:35 +00:00
Axel Dörfler
3f2a18bd30 * The UDP protocol was deleting a received error buffer twice in the case that
everything went okay. This finally fixes #6446.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38145 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 15:01:26 +00:00
Andreas Färber
0d6a8357f4 Generic: Type fixes for atomic op
Cast uint32* arguments for atomic_or() to int32*.

Resolves warnings treated as errors for Big Endian targets.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38128 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-15 22:38:41 +00:00
Andreas Färber
994f861dfc Generic: Type fixes for byte swapping
Cast further pointer arguments for B_HOST_TO_LENDIAN_INT32 to uint32.

Resolves warnings treated as errors for Big Endian targets.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38127 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-15 22:32:58 +00:00
Axel Dörfler
df2895e0f8 * Automatic whitespace cleanup, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38119 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-15 13:24:41 +00:00
Axel Dörfler
44a3d0d1f6 * Spotted a few reference counting bugs that were probably responsible for
#6446, although I could not reproduce the exact problem.
* net_datalink::is_local_[link_]address() now releases a previous reference if
  the _interfaceAddress arguments does not point to NULL.
* When a buffer is received from a device, it's interface_address should be NULL
  already.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38118 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-15 13:21:42 +00:00
Axel Dörfler
11eccb54e2 * Added ability to be able to dump a net_interface by name.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38117 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-15 13:17:52 +00:00
Andreas Färber
be95e26df8 ATA: Type fix for byte swapping
Cast pointer arguments for B_HOST_TO_LENDIAN_INT32 to uint32.

Resolves warnings treated as errors for Big Endian targets.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38114 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-15 11:57:24 +00:00
Axel Dörfler
a89dbefb7d * On change_address(), arp_remove_local_enty() must not switch to the address
that caused the change (but that has not actually been changed yet).
* Also, it will now reset the INADDR_ANY local address in case there is no
  other address configured. This should help with automatic configuring after
  deletion of an interface address (though it doesn't seem to work yet for
  some other reason, at least in VMware).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38110 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-15 10:39:39 +00:00
Andreas Färber
756ea297c2 Firewire: Type fix for byte swapping
Cast return value of __swap_int32 to uint32_t, as suggested by Ingo.

Remedies uint32 %08x warnings treated as errors in the Big Endian code path.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38106 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-15 09:37:20 +00:00
Axel Dörfler
75148e0193 * Applied patch by Janito that fixes broken reverting when a rename operation
failed on last chance. Thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38103 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-14 18:41:52 +00:00
Stefano Ceccherini
cdb58cbb69 Fix a possible NULL dereference. CID 1582
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38102 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-14 17:34:02 +00:00
Adrien Destugues
c3d88d5160 Fix clang build. modf is not good for optimizations it seems
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38092 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-13 19:45:54 +00:00
Axel Dörfler
8dcde8b128 * B_SOCKET_SET_ALIAS handling was leaking references.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38079 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-13 10:27:00 +00:00
Axel Dörfler
7e5d6acf69 * Added rlphy MII driver back to the rtl81xx driver - originally, I intended to
change the current MII management, but I ran out of time.
* This should fix bug #6295.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38078 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-13 09:10:53 +00:00
Axel Dörfler
8ccc01cf2d * Improved the output of the "net_domains" KDL command.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38077 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-13 08:02:40 +00:00
Clemens Zeidler
756e5df62f Fix gcc2 build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38076 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-13 04:06:58 +00:00
Clemens Zeidler
bc7f766f5d Use new listener interface.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38073 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-12 23:06:11 +00:00
Clemens Zeidler
b960e45194 Add the SATDecorator. This is a new implementation of Stack and Tile with a different tiling logic. For example, this should make overlapping windows in the same tiling group impossible. There are still many issues I know about and this version is far from usable but the basic features are working now. So if you like to test it at this state please only report errors like crashes or memory leaks (think there is one).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38071 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-12 22:37:16 +00:00
Axel Dörfler
095f97a6b6 * Fixed memory leaks pointed out by Stephan, thanks!
* Automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38068 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-12 21:20:31 +00:00
Adrien Destugues
77fa0021d9 Enable the "interpolate" resampling method. Results are not as good as I expected, however.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38066 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-12 17:12:00 +00:00
Alex Wilson
25fd5c7b35 Update some apps/add-ons/preflets for impending changes to the layout API, specifically the layout builders. Also do a bit of style and layout cleanup in some places. This is part of #6407. Everything I've updated should look and function the same as it did before.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38064 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-12 16:54:03 +00:00
Axel Dörfler
2c12b8a334 * Also report the address index back to the userland.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38059 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-12 13:45:18 +00:00
Axel Dörfler
14d0b44b79 * Applied the B_SOCKET_SET_ALIAS address retrieval logic to B_SOCKET_GET_ALIAS
as well (of course, no address is created automatically here).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38058 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-12 13:38:52 +00:00
Axel Dörfler
a271028e37 * Also create a new address for B_SOCKET_SET_ALIAS if the index is -1 - this
now has an almost equivalent logic to the old setters like SIOCSIFADDR.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38054 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-12 13:27:50 +00:00
Axel Dörfler
910ffb32fe * If the network mask, and broadcast are not specified with a B_SOCKET_SET_ALIAS
they will no longer be unset - instead they are set with defaults.
* If B_SOCKET_SET_ALIAS gets an index of -1, it will now try to find the local
  address, and if that fails, will just use the first address there is.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38053 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-12 13:25:45 +00:00
Adrien Destugues
de6ba1a073 CID 1393: Memory leak.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38051 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-12 13:16:40 +00:00
Adrien Destugues
e0bc2fcce4 CID 903 : Memory leak on error.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38048 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-12 12:39:39 +00:00
Adrien Destugues
eaf26d03ba CID 912: Memory leak on error.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38046 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-12 12:31:27 +00:00
Adrien Destugues
99002a3991 CID 691 : parameter not used in fprintf, but still evaluated, leading to acces out of bounds of array.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38044 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-12 12:09:05 +00:00
Adrien Destugues
b9eef2a018 CID 704 : Off-by-one error.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38043 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-12 11:59:51 +00:00
Adrien Destugues
ff617a11dd * Add a resampler that interpolates instead of dropping/copying samples.
* Not plugged anywhere yet.
 * I'm not sure the downsampling is done properly, either.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38037 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-12 10:18:38 +00:00
Axel Dörfler
3794b8e560 * Applied Atis latest changes to the IPv6 related modules. This brings them back
into a working state after the latest stack changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38021 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-11 12:44:38 +00:00
Axel Dörfler
e8802e499c * datalink_control() also need to accept structures smaller than ifreq as long
as the interface name can be specified.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38015 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-11 11:41:54 +00:00
Axel Dörfler
28bbeaca96 * Removed the call to net_stack_module::register_domain_device_handler(), as
it's not needed for locally received buffers. This fixes a doubled
  initialization for a single device when there is more than a single domain
  involved. Reported by Atis.
* Fixed missing call to unregister_device_deframer() in case there was not
  enough memory to allocate the loopback_frame_protocol object.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38002 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-10 10:46:27 +00:00
Axel Dörfler
1ebd87f4e7 * As Atis pointed out, the SIOCSIFNETMASK here didn't make any sense, must have
been a copy&paste error.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38001 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-10 10:31:22 +00:00
Axel Dörfler
3a5082aa46 * Got rid of the home brewn double click detection - we're now simply using the
"clicks" field of the mouse message as everywhere else.
* Renamed Decorator::Clicked() to MouseAction().
* Minor style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37996 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-10 09:14:46 +00:00
Axel Dörfler
4af124a15a * We need to acquire references to the interface_address when copying/cloning
the buffer, and we also need to release it when freeing it.
* Adapted patch by Atis: append_cloned_data() now preserves the stored header;
  this is kind of bad, because it will not notice if the original header is
  removed, but this could probably just be documented this way.
* Also print the reference count of the interface addresses.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37993 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-09 19:03:39 +00:00
Axel Dörfler
c8b53acf35 * Also initialize the arp_protocol::local_address field, spotted by Atis,
thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37991 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-09 17:53:42 +00:00
Axel Dörfler
78abd72799 * Made the work-around that Atis added to ifconfig and the net_server
in order to be able to use SIOCSIFADDR (and friends) on a net yet added
  family superfluous; we now add a new address when needed on the fly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37990 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-09 17:08:41 +00:00
Stefano Ceccherini
e36d4dad06 Cast error to status_t when throwing, otherwise it won't be caught.
CID 1962


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37969 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-08 11:33:15 +00:00
Jérôme Duval
db6f1135a6 CID 1418: fInputByteSwap was leaked.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37964 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-08 00:00:54 +00:00
Jérôme Duval
5e819d74dd CID 1464: Delete an array with delete[]
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37963 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-07 23:49:49 +00:00
Jérôme Duval
3d8f229273 CID 1390: buf was leaked in case of error.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37962 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-07 23:30:35 +00:00
François Revol
abfa93e2e6 Fix warnings & build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37948 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-07 00:32:31 +00:00
Axel Dörfler
1f9c8c4576 * Changed the _SIZEOF_ADDR_IFREQ() macro such that it can be used how we are
using it - hopefully, that is actually correct (it's adopted from FreeBSD).
* Fixed bug that cut off the sockaddr_dl reported by the system, so that DHCP
  wouldn't work anymore (and ifconfig wouldn't show the actual MAC address
  anymore).
* Changed the listing code to actually pad to ifreq size, and leave the length
  of the sockaddr untouched.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37941 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-06 12:58:02 +00:00
Axel Dörfler
8b6048a285 * The sockaddr_dl can actually be longer than sockaddr, so we need to use a
sockaddr_storage here (wasn't that bad before, as ifreq has a 30 bytes buffer
  after the sockaddr.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37940 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-06 12:55:51 +00:00
Axel Dörfler
081dd39e94 * Further improved debug output.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37938 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-06 11:13:00 +00:00
Axel Dörfler
b0cf274a3f * Interface::_ChangeAddress() got the address check for equality wrong,
effectively rejecting any try to set an address.
* It now copies the new address as well in order to make sure that its
  sa_len field is set correctly.
* Improved debug output.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37937 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-06 09:59:55 +00:00
Axel Dörfler
6b1e148824 * Only actually call change_address() of the net_datalink_protocols if the
address actually changed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37928 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-05 13:27:31 +00:00
Axel Dörfler
715fed4479 * Make sure the SIOCGIFCONF never returns an address with an address length
smaller than sizeof(sockaddr). This fixes a compatibility issue with other
  platforms - portable software often assumes that the amount of bytes to
  add to an ifreq structure is the larger amount between sizeof(ifreq), and
  basically what the _SIZEOF_ADDR_IFREQ() macro returns, instead of always
  relying on that macro.
* Renamed UserBuffer::Copy() to Push, ConsumedAmount() to BytesConsumed(),
  added Pad() method.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37927 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-05 13:17:12 +00:00
Axel Dörfler
cb51fb9e4d * Turns out it wasn't such a bright idea to reset the protocol in
arp_update_entry() for known entries, as it also uses that to update the
  timestamp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37923 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-05 11:09:17 +00:00
Axel Dörfler
07ad8bb60e * We need to call arp_remove_local_entry() from arp_change_address() even if the
old address is NULL for anything but SIOCAIFADDR. Hopefully, this fixes the
  problem Rene is seeing.
* Make sure that arp_entry::protocol is not NULL before using it. This is
  necessary because of the possibility to manually set ARP entries.
* Further improved debug output.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37916 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-05 07:56:23 +00:00
François Revol
49101c576d Fix warnings and thus build. It's still unusable with QEMU for ex, which uses a different default colorspace.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37914 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-05 00:37:30 +00:00
Axel Dörfler
afbbc97abf * Improved debug output.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37906 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-04 18:16:07 +00:00
Oliver Tappe
e0ea55e0a0 * added get_timezone_offset() to kernel, which returns the offset in seconds
* made FAT add-on use get_timezone_offset(), this time correctly adjusted for
  the difference in units (minutes/seconds)
This makes the times in our FAT-fs agree with Linux again, at least :-)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37905 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-04 17:11:47 +00:00
Philippe Houdoin
cc8eceb0af Report the actual error when read() or write() a network device failed.
This enable to actually detect and handle device removal (USB...).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37897 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-04 11:11:56 +00:00
Axel Dörfler
2b4154458a * Finished groundwork on ICMP by introducing a completely protocol agnostic
error mechanism.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37896 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-04 10:35:40 +00:00
Axel Dörfler
dc660d32ef * Call put_domain_protocols() without having the socket locked. This fixes bug
#5210.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37895 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-04 08:42:25 +00:00
Oliver Tappe
7e965f506d More consolidation of timezone code:
* dropped DaylightSavingTime from real_time_clock code in kernel, it was
  never really being used for what it meant (and just being referred to by
  gettimeofday(), which put a different meaning to it
* adjusted the syscalls get_timezone() & set_timezone() as well as their callers 
  accordingly
* got rid of get_rtc_info() and rtc_info struct in kernel, as it was only
  being referred to by the FAT add-on and that one (like gettimeofday()) put a
  different meaning to tz_minuteswest. Added a comment to FAT's util.c
  showing a possible solution, should the hardcoded GMT timezone pose a problem.
* fixed declaration of gettimeofday() to match POSIX base specs, issue 7
* changed implementation of gettimeofday() to not bother trying to fill struct
  timezone - it was using wrong values before, anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37888 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-03 23:02:57 +00:00
Clemens Zeidler
f8751b1fe6 Fix coding style.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37887 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-03 20:33:05 +00:00
Axel Dörfler
7aa2819c12 * Enabled removing the interface on device removal again.
* Made the return type of remove_interface() void, as it cannot fail.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37884 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-03 19:33:05 +00:00
Axel Dörfler
2b1c0755dd * Renamed the proprietary SIOC_* ioctls to B_SOCKET_* - no reason to pollute
global name space, and have ugly identifiers for nothing :-)
* Added a flags field to struct ifaliasreq. Added flags to mark an alias that
  is currently being configured, or has been automatically configured.
  Those flags aren't used yet, but they will replace IFF_CONFIGURING and
  friends.
* Implemented deleting addresses only from interfaces via ifconfig.
* Added more command aliases for delete to ifconfig ("del", and "delete", for
  more consistency with route).
* Fixed control_routes() to only release a reference to an address if it
  actually got one before.
* If an interface address is deleted, its routes are now removed as well.
* InterfaceAddress now holds a reference to its interface as planned.
* Implemented removing interfaces. Works quite nicely.
* When downing an interface, all of its routes are now removed. When upping
  it again, at least the default routes are added.
* datalink.cpp's get_interface_name_or_index() leaked a reference to the
  interface found.
* SIOCAIFADDR would also leak a reference when new addresses were added.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37872 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-03 15:51:54 +00:00
Axel Dörfler
2651e51d92 * Renamed net_datalink_module::send_data() to send_routed_data(), and
send_datagram() to send_data().
* Renamed DatagramSocket::SocketEnqueue() to EnqueueClone(), SocketDequeue()
  to Dequeue().
* Ordered the methods in ProtocolUtilities.h according to their declaration.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37870 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-03 12:00:06 +00:00
Axel Dörfler
03e02ed983 * Introduced a datalink layer (2) independent way of specifying the packet
type one wants to receive. Changed ipv6_datagram to use that (but note that
  it currently does not compile).
* Header cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37868 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-03 11:23:03 +00:00
Adrien Destugues
4d978eea2f * Fix the WinDecorator and some parts of the MacDecorator
* Since they all work reasonalbly well, add them to the default image. (beOs had them after all)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37864 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-03 10:32:19 +00:00
Clemens Zeidler
b9857cc356 Adapt MacDecorator to the new addon interface.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37859 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-03 04:46:21 +00:00
Clemens Zeidler
1649544d81 Adapted the ClassicBe decorator to the new DecorAddOn interface.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37858 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-03 04:38:38 +00:00
Clemens Zeidler
4d1aa4a619 Some coding style fixes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37854 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-02 23:16:19 +00:00
Axel Dörfler
cd08b9f7bc * Work in progress of extending the AF_LINK protocol to be able to send and
receive raw packets (only without the ethernet framing).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37853 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-02 21:21:16 +00:00
Axel Dörfler
67678a989e * put_device_interface() now also accepts a NULL pointer.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37852 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-02 21:17:33 +00:00
Axel Dörfler
edf1018372 * Removed a superfluous check.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37851 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-02 21:16:02 +00:00
Axel Dörfler
ca215dfe68 * Replaced more occurences of EOPNOTSUPP with B_NOT_SUPPORTED.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37847 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-02 16:27:44 +00:00
Axel Dörfler
fee56868a1 * Added a dedicated lock for the device monitors. This fixes a locking issue in
interface_protocol_send_data() which accessed the monitors unlocked.
* Changed SIOCCPACKETCAP to check if the device name matches the one used with
  SIOCSPACKETCAP.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37845 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-02 15:23:19 +00:00
Axel Dörfler
41f05b8607 * Made datalink and interface protocol module functions static.
* Got rid of datalink.h.
* Only allow sending/receiving of packets through AF_LINK for root (not that
  sending would be implemented yet).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37844 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-02 14:45:44 +00:00
Axel Dörfler
cb8adf5ed2 * Only allow raw sockets for root.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37843 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-02 14:18:26 +00:00
Axel Dörfler
845a29a054 * B_SELECT_{READ|WRITE|ERROR} are no flags fields, so they cannot be or'ed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37834 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-02 08:28:47 +00:00
Axel Dörfler
791fe8ec0f * Added new socket ioctls to strace, and the datalink debug output.
* Added a few more types to strace's network ioctls.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37807 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-29 09:54:46 +00:00
Axel Dörfler
9d771afb39 * Added Haiku specific socket ioctls to configure the interface aliases:
SIOC_IF_ALIAS_ADD, SIOC_IF_ALIAS_REMOVE, SIOC_IF_ALIAS_GET, SIOC_ALIAS_SET,
  and SIOC_IF_ALIAS_COUNT.
* Implemented all of those new ioctls, though they are yet untested.
* Added ifreq::ifr_data, and removed the hack in the FreeBSD compat if.h
  header.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37806 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-29 09:43:08 +00:00
Axel Dörfler
5b2bb28ea1 * Fixed typo that broke the build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37805 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-29 09:38:07 +00:00
Axel Dörfler
4d41aff0ac * Made sure is_empty_address() also detects AF_UNSPEC addresses as empty.
* The is_empty_address() function of AF_UNIX did not deal correctly with empty
  addresses.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37804 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-29 09:33:45 +00:00
Axel Dörfler
d72a2493e6 * Replaced ENODEV with B_DEVICE_NOT_FOUND.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37803 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-29 09:28:54 +00:00
Axel Dörfler
61729d9323 * Reworked the complete stack to allow more than one address per network
interface - this caused quite a number of changes.
* Network interfaces, and its addresses are now reference counted (not yet
  complete, though, InterfaceAddresses need to hold references to their
  interface as well).
* There are two known regressions of this commit that I will fix later:
  - you cannot remove interfaces anymore
  - IPv4 multicast was broken anyway, but now it's disabled, too.
* Moved a device_interfaces.cpp|h out of interfaces.cpp.
* The datalink layer chain is now instantiated per domain per interface,
  not just per interface anymore.
* When a buffer reaches the network layer, it has no known interface yet, ie.
  the ipv4|6|whatever modules need to set this manually.
* Added more debug output, and some new debugger commands, the control option
  is now printed in clear text.
* Added hash_address() function to the address modules. Added "const" to
  set_to_defaults() where needed.
* Fixed net_buffer's restore header functions offset use as reported by Atis.
* Improved buffer dump output, use the domain module to print the address if
  available.
* Moved net_buffer::type into the union, as it's not needed by the upper layers
  anymore.
* Moved IPv6 specific code from {add|remove}_default_route() to where it
  belongs, but disabled it for the time being.
* Completely discarded useless ipv4_datagram module.
* Added ping6 to the build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37794 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-28 17:38:23 +00:00
Axel Dörfler
b216fbd077 * Applied next work in progress patch by Atis that takes into account most of
my comments so far. Thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37793 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-28 17:09:12 +00:00
Michael Pfeiffer
6f0d416957 * Moved enconding files into system/data/PDF Writer directory,
as correctly pointed out by Ingo these are no setting files.
* Use find_directory() here and in places marked with TODOs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37772 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-27 14:45:25 +00:00
Adrien Destugues
4e525978ba * Make linkcatkeys output the fingerprint in decimal in case of error. This makes it easier to match with the one in the
catkey file.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37766 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-27 09:16:38 +00:00
Michael Pfeiffer
b085f93bcd * Added files used by PDF Writer to the image
(closed ticket #6380).
* Changed path to /boot/common/settings.
Someone feel free to change the implementation to get 
the path from find_directory(...). 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37761 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-26 18:30:36 +00:00
Axel Dörfler
2e1729d050 * Removed _EndpointFor() again; DeliverError() is using _FindActiveEndpoint()
instead, ie. ICMP errors are only forwarded to connected UDP sockets.
* Also notify the DatagramSocket's dequeue loop if an error occurs - this makes
  udp_unreachable finally work as intended.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37714 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-23 10:24:19 +00:00
Axel Dörfler
988d8d4088 * If an error is notified, also forward the even to read/write.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37713 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-23 10:13:05 +00:00
Axel Dörfler
d62ee168ed * Corrected naming/visibility of the DatagramSocket methods (protected methods
do not get the '_' prefix, only private ones do).
* Added a "peek" argument to SocketStatus() (and generally renamed "clone" to
  "peek" where it made sense).
* Implemented the base version of SocketStatus() to return the actual socket
  error. This enables returning ICMP errors back to the socket user.
* Other minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37712 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-23 10:12:06 +00:00
Axel Dörfler
b0e48987f0 * ipv4_error_received() also needs to fill in the buffer's address, and
protocol, and cut off its IPv4 header before forwarding the buffer to the
  upper layers.
* Some minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37711 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-23 10:08:23 +00:00
Axel Dörfler
6404b00512 * We need to delay the checksum computation after the reply is complete.
* Also, we need to set the buffer's protocol.
* Now we actually send correct ICMP messages.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37710 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-23 10:04:40 +00:00
Axel Dörfler
d98980a446 * dump_buffer() now also prints the stored header, if any, and a bit more data.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37709 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-23 10:02:10 +00:00
Stephan Aßmus
ba0f80c46b * Split debug output into general, audio and video (video output not done).
* Set the AVContext->frame_size, though I don't think it has any effect.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37707 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-23 09:16:18 +00:00
Stephan Aßmus
5061b3521f Patch by Adek336: Support one more H264 fourcc in B_QUICKTIME_FORMAT_FAMILY.
Allows playback of H264 content in Flash container (probably among others).
Thanks! Closes #6372.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37706 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-23 08:27:37 +00:00
Stephan Aßmus
4117556768 Patch by Adek336: Improve debug output in AVFormatReader for the codec id
returned by libavformat. Style fix by myself.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37705 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-23 08:25:45 +00:00
Axel Dörfler
437ecdb9d5 * We need to invalidate all routes belonging to the interface when removing it.
* This fixes the second problem mentioned in bug #6243, and therefore the bug
  itself.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37692 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-22 13:07:12 +00:00
Axel Dörfler
4ea113cd53 * Make sure the interface matches to the route if given. This fixes problem 1 of
bug #6243.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37691 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-22 13:00:23 +00:00
Axel Dörfler
74a4c33fda * Implemented a way to preserve header data while passing along a buffer to the
upper layers: you use the store_header() function to mark the header you want
  to preserve. All subsequent remove_header() calls won't claim the actual
  data, but only move the node start around.
* This header can then be restored by restore_header(). However, a call to
  prepend_data() will destroy the stored header. Also, if remove_header() cuts
  off a whole node, restoring the header won't succeed anymore.
* Discarded the no longer needed net_buffer::network_header field.
* Also discarded the hoplimit field which temporarily breaks the IPv6 build
  until Atis reworks it.
* IPv4 now also dumps the IP header in the send path if debug output is enabled.
* icmp_error_reply() might be called so early that the net_buffer's addresses
  do not point to the reply address; this is now detected, and the addresses are
  taken out of the IP header in that case.
* Improved dumping the net_buffer to also include its address, and flags.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37688 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-22 12:26:46 +00:00
Ingo Weinhold
0a1dabca7e Added public io_request_is_vip(), returning whether the given request has the
VIP flag set.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37678 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-22 11:08:34 +00:00
Stephan Aßmus
df2945b3c5 "-O20" GCC flags should have been bogus. As far as I know, we are already
compiling with "-O2". Fixes ticket #6303.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37676 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-22 07:15:59 +00:00
Oliver Tappe
0ea1aab28a * fixed a couple of regressions of r37670 concerning optional build targets
(bluetooth, ac3_decoder, netfs)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37672 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-21 23:10:57 +00:00
Oliver Tappe
eddec292d5 * applied patch by kaliber that fixes more than 100 warnings - thanks a lot!
Closes #6349

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37670 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-21 21:43:20 +00:00
Axel Dörfler
0a0bed1c7b * Improved debug output; ipv4 will now dump the whole header if TRACE_IPV4 is defined.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37661 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-21 16:23:38 +00:00
Axel Dörfler
2bb43d8246 * First (untested) steps into ICMP support for UDP: we should send port
unreached ICMP messages now, and at least signal an error to select() (there
  is no mechanism yet to actually forward the error to userland).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37651 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-21 14:57:28 +00:00
Axel Dörfler
fcea1b1665 * ICMP now removes its header before passing the error on to the upper levels.
* Therefore, IPv4 no longer needs to mess with that (incorrectly, anyway).
* Removed unused include, turned off ICMP debug output.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37650 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-21 14:54:24 +00:00
Axel Dörfler
aea00dc3bc * deliver_multicast() now returns whether or not it delivered the buffer,
instead of always returning B_OK.
* deliver_multicast() now takes the protocol restriction of a raw socket into
  account.
* raw_receive_data() now correctly returns whether a buffer was delivered (due
  to the protocol restriction, this wasn't the case before).
* ipv4_receive_data() leaked all multicast buffers.
* Some minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37648 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-21 13:11:58 +00:00
Axel Dörfler
1978fb81ee * First part of ICMP support: this is based on the work by Ivo Vachkov (GSoC
2007), and Yin Qiu (GSoC 2008). And even though I needed to rewrite pretty
  much all of it because of the countless bugs and problems it had, it still
  shares the same architectural problems of introducing a domain dependent
  error mechanism to the upper layers, and needing the
  net_buffer::network_header hack. This I will rework later.
* net_buffer's append_size(), and prepend_size() will now gracefully handle
  buffers without a data node.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37647 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-21 12:00:27 +00:00
Ingo Weinhold
83f46ed6ab file_cache_write() can get a NULL buffer and still a size != 0, which the
request handling wasn't taking into account.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37640 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-21 09:55:04 +00:00
Adrien Destugues
75e29683b2 * BeDecorator : use _InvalidateFootprint as in the default decorator.
* MacDecorator : use _InvalidateFootprint and implement _MoveBy. This makes the MacDecorator work fine again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37615 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-20 10:47:11 +00:00
Axel Dörfler
8d1485fa06 Work in progress commit by Atis Elsts (I'm posting his ChangeLog comments
directly here), I made only a few style changes:
* introduced 'has_broadcast_address' field in
struct net_address_module_info
 - REVIEW: the name, and the status of this field for UNIX and L2CAP
	families
* ipv6 address family support
* ipv6 address printing	
* ipv6 protocol support	
* ipv6 multicast support
  - TODO: add and remove multicast routes in a more proper way
  - TODO: support MLD
* ipv6 datalink protocol support
* icmpv6 protocol support (EchoRequest and EchoResponse messages)
* ipv6 neigbor discovery protocol support
  (Advertisement and Solicitation messages)
  - TODO: only the very basic support is present,
	the protocol state machine is by no means completed
  - TODO: replying to Solicitation does not work too good ATM
	(visible, when pinging Haiku from outside)
* added Jenkin's hash algorith
* minor changes in existing IPv4 code - cleanup function
	ipv4_get_loopback_address(), written by myself
* add tests: raw, udp, tcp/udp, mullicast sender
* add 'hoplimit' field in struct net_buffer
  - TODO: this is just a hack, more generic approach would be  better.
* add 'receive_data' function pointer in
	struct net_datalink_protocol_module_info
  - TODO: this is also more like a hack, to support information
	passing from ICMPv6 to IPv6_datagram level.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37604 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-19 16:55:55 +00:00
Axel Dörfler
d869a06172 * Made the stack send out interface change notifications where needed (at least
hopefully :-)).
* Improved interface change notification to include the flags that changed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37594 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-19 13:48:16 +00:00
Adrien Destugues
a6036edea1 * Update the MacDecorator to be more in-line with the new API. It still doesn't draw anything, however.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37589 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-19 12:12:18 +00:00
Axel Dörfler
51b6847f5f * Dump a line if an unhandled ICMP packet was received.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37584 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-19 11:10:45 +00:00
Axel Dörfler
0fc7ab7be6 * put_route() now survives being called with a NULL domain (TCP might do this).
* This fixes bug #6239.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37583 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-19 10:58:59 +00:00
Ingo Weinhold
ae3bba85bb Volume::Link(): Also unwrap the target vnode. The client FS would get a wrong
vnode pointer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37581 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-19 10:48:44 +00:00
Ingo Weinhold
08e2a0556c do_iterative_fd_io(): Don't fail when the getVecs callback returns
B_BUFFER_OVERFLOW. It will have returned valid vectors in this case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37572 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-19 01:14:02 +00:00
François Revol
92d7886758 Fix Mac decorator build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37570 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-18 20:16:23 +00:00
Adrien Destugues
3becd1d260 * Fix the ClassicBe decorator for decorator API change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37565 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-18 16:31:25 +00:00
Ingo Weinhold
1977401106 Simplified Jamfiles. The drivers isn't built anyway, though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37520 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-14 21:11:24 +00:00
Oliver Ruiz Dorantes
8638173cff - Implementation for sendto() & close(), tested over a Motorola V5
- Incomming command rejections not yet properly handled.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37486 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-12 22:08:11 +00:00
Oliver Ruiz Dorantes
ef36d96496 - Implement hook Connect()
- Polish l2cap signals negotiation



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37472 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-11 16:57:47 +00:00
Jérôme Duval
f0cbfc95e0 fix build with gcc4 and DEBUG
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37467 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-11 13:25:14 +00:00
Jérôme Duval
7a87728eea added yuy2 and nv12 guid
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37466 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-11 12:00:06 +00:00
Rene Gollent
0537120f12 Fix broken BaseTranslator code that was 100% guaranteed to crash any app making use of Translators.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37464 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-10 21:37:29 +00:00
Rene Gollent
526e86ac79 Fix translator builds.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37463 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-10 20:52:30 +00:00
Adrien Destugues
87f030bc81 Patch by Jorma Karvonnen : localize BaseTranslator. Thanks !
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37462 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-10 19:20:08 +00:00
Stephan Aßmus
a9ab7e7f24 Patch by Kaliber: Supported device list was missing terminator. Fixes ticket
#6286. Thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37441 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-09 15:52:35 +00:00
Axel Dörfler
4b0427bddc * Since the native rtl8169 is problematic on many chipsets (including mine),
I've removed it for now, until someone finds the time to look into it.
* Therefore, enabled all supported devices for the rtl81xx driver.
* Made the rtl81xx driver actually work by adding the missing PHYs - it doesn't
  use the same PHYs as the rtl8139 driver. Imported the rgephy.c|h from FreeBSD
  8 (not yet in vendor branch, but unchanged).
* It seems to work reliably with Gigabit now, albeit a bit slow, and with too
  high CPU load.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37425 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-08 07:04:44 +00:00
Stephan Aßmus
0f66fdc1b3 Patch by kaliber. Fixes mismatched types for the PCI domain attribute! Closes
#6269, thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37416 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-07 15:37:23 +00:00
Ithamar R. Adema
c4c6cedde6 * Work around a problem with a USB device (in my case, Qualcomm Gobi 3G modem) that reports interface_number values that are out of range with the interface_count. This would make the usb stack in Haiku crash.
Will need a different fix to get device to work, but at least Haiku won't crash on bootup with this change.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37409 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-05 20:51:59 +00:00
Ingo Weinhold
e66231742e Added a bit of stuff referenced by inline functions in private kernel
headers. GCC 2 has the unpleasant habit of actually linking the unused inline
functions in. That doesn't suffice to build the userlandfs server with debug
info (it would be the wrong file anyway), but allows to build checksumfs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37405 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-05 16:48:44 +00:00
David McPaul
651dcdac93 Same fix needed as mp3_decoder see r37362 and bug #6251
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37391 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-04 13:36:28 +00:00
Wim van der Meer
af56de5bb1 Style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37376 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-03 12:45:44 +00:00
Wim van der Meer
568716bed7 Style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37370 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-03 10:23:04 +00:00
Wim van der Meer
6b176bef5b Style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37366 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-03 08:11:37 +00:00
Wim van der Meer
a6cd1edfaa Style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37365 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-03 07:49:30 +00:00
Wim van der Meer
24874466dc Style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37364 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-03 06:29:52 +00:00
David McPaul
affec393bc Update to latest libasf (r107)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37363 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-03 06:12:56 +00:00
David McPaul
a775c1a432 Correct test. Fixes bug #6251
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37362 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-03 06:11:39 +00:00
Adrien Destugues
be8fa2fb30 * Update all applications in tree to use the new localizing system
* Remove the old one from the locale librairy, with some cleanup
Known regressions :
 * readonlybootprompt will no longer update the locale settings : the 
method used messed with internal undocumented things
 * external localized apps (webpositive for example) will not run 
anymore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37336 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-02 11:36:13 +00:00
Axel Dörfler
8efbc2761e * Further cleanup while I was at it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37334 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-02 08:14:54 +00:00
Axel Dörfler
10d0523409 * Removed questionable use of strlen().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37333 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-02 08:10:38 +00:00
Jérôme Duval
c5f257c095 style cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37328 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-01 21:08:55 +00:00
Wim van der Meer
ac40d7205b Fixing the memory leak intruduced by my previous patch. Thanks to Ithamar for pointing this out.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37325 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-01 12:13:26 +00:00