summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* bump version and add release notesv2.0.1Gravatar Dan Dennedy 2009-01-142-2/+6
| | | | Signed-off-by: Dan Dennedy <dan@dennedy.org>
* Set errno = ENOSYS in unimplemented functionsGravatar Stefan Richter 2009-01-121-0/+5
| | | | | | | Most of them do this already, only a few missed it. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Dan Dennedy <dan@dennedy.org>
* Work without permission to access local node's /dev/fw*Gravatar Stefan Richter 2009-01-103-21/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On 10 Jan, David Moore wrote: > On Sat, 2009-01-10 at 19:28 +0100, Stefan Richter wrote: >> @@ -161,14 +160,16 @@ scan_devices(fw_handle_t handle) ... >> + for (j = 0; j < i; j++) >> + if (ports[j].card == get_info.card) >> + continue; >> + > > That continue statement doesn't do what you intended I think. From: Stefan Richter <stefanr@s5r6.in-berlin.de> Subject: [PATCH] Work without permission to access local node's /dev/fw* Fix for juju backend: libraw1394 required write permission to the character device file of the local node(s) in order to enumerate cards and for a number of other operations. This forced users to either run applications like dvgrab and kino with elevated privileges, or to configure write permission for all /dev/fw* or at least for local nodes' /dev/fw*. We now use the first accessible file which was found for each card for as many tasks as possible, instead of the local node's file. This allows distributors or admins to implement stricter access rights (default off, e.g. only on for AV/C and IIDC devices) without sacrificing functionality of said class of applications. Access to the local node is now only required by low-level tools like gscanbus. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Dan Dennedy <dan@dennedy.org>
* Fix stack corruption during juju lock transactionsGravatar David Moore 2008-12-291-13/+19
| | | | | | | | | | | | | | | When performing a lock transaction (such as with fw_lock) under Juju, 4 bytes of the stack gets corrupted. This is because the lock transaction has 8 bytes of data sent and 4 bytes received. Since the transaction "length" is specified as 8, handle_device_event() copies 8 bytes into the destination variable instead of the desired 4, and overflows into the stack by 4 bytes. This patch fixes the corruption by adding an extra "out_length" argument to the send_request() function so that both in_length and out_length can be specified separately. Signed-off-by: Dan Dennedy <dan@dennedy.org>
* Fix iso_shutdown with juju firewire stackGravatar Jarod Wilson 2008-12-082-3/+22
| | | | | | | | | | | | | | | | | | Make iso start/stop/start sequences on the same handle, such as those used by apps such as MythTV behave as expected. I can finally watch video off my cable box over FireWire using MythTV w/the juju stack now. :) Initially, seemed a one-liner might be the ticket (setting handle->iso.fd = -1 at the end of fw_iso_shutdown()), but that led to memory corruption and a locked up system. What ultimately worked was essentially mimicking what the old stack did to track iso state, and call fw_iso_stop() from fw_iso_shutdown() as needed. Nb: Only lightly tested with iso receive via MythTV, but its all fairly straight-forward, I think. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Dan Dennedy <dan@dennedy.org>
* Checking /dev/raw1394 and recommendation for creating it for the install ↵Gravatar Dan Dennedy 2008-12-071-23/+0
| | | | | | make target is no longer relevant because opf firewire and udev. Signed-off-by: Dan Dennedy <dan@dennedy.org>
* testlibraw: test raw1394_read_cycle_timer()Gravatar Stefan Richter 2008-12-071-0/+23
| | | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Dan Dennedy <dan@dennedy.org>
* testlibraw: test all cards instead of only the firstGravatar Stefan Richter 2008-12-071-120/+143
| | | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Dan Dennedy <dan@dennedy.org>
* Let fw_read_cycle_timer() use the local fd instead of requiring iso to be ↵Gravatar Dan Dennedy 2008-12-071-1/+1
| | | | | | initialized Signed-off-by: Dan Dennedy <dan@dennedy.org>
* [libraw1394 patch] Unify {ieee1394,fw}_bandwidth_modify()Gravatar Stefan Richter 2008-12-033-56/+1
| | | | | | | | | | | | because they do the same. We only may want a separate fw_bandwidth_modify() in the future when firewire-core gains a special ioctl() for that. (Not runtime-tested, but it looks good to me.) Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Dan Dennedy <dan@dennedy.org>
* [libraw1394 patch] Fix raw1394_channel_modify() on firewire-coreGravatar Stefan Richter 2008-12-034-57/+2
| | | | | | | | | | | | | | | | | | | (juju) Reported by Adrian Knoth: fw_channel_modify() was unable to allocate some channels which were actually free. http://marc.info/?l=linux1394-devel&t=122818128900002 This can be easily fixed by replacing fw_channel_modify() by ieee1394_channel_modify() because this is highlevel enough to work with Juju as well. We only may want a separate fw_channel_modify() in the future when firewire-core gains a special ioctl() for that. Also fix a documentation typo: raw1394_channel_modify() did not show up in extracted API documentation due to a cut'n'paste typo in raw1394.h. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Dan Dennedy <dan@dennedy.org>
* Fix segfault in juju's handle_arm_requestGravatar Stefan Richter 2008-10-281-0/+2
| | | | | | | The buffer pointers were uninitialized, leading to segfault in memcpy. Bug report and initial version of the fix by Adrian Knoth. Signed-off-by: Dan Dennedy <dan@dennedy.org>
* Reduce nesting depth in new_handle dispatchersGravatar Stefan Richter 2008-10-281-47/+49
| | | | Signed-off-by: Dan Dennedy <dan@dennedy.org>
* Address some compiler warningsGravatar Stefan Richter 2008-10-285-10/+5
| | | | | | 7x unused variable, 1x assignment used as truth value, 1x pointer signedness Signed-off-by: Dan Dennedy <dan@dennedy.org>
* Makes extra sure strings are not overrun.Gravatar Erik Hovland 2008-10-281-13/+19
| | | | | | | | | When using strncpy with the exact size of the destination string the string may end up lacking null termination because the source string is bigger then the destination. Signed-off-by: Erik Hovland <erik@hovland.org> Signed-off-by: Dan Dennedy <dan@dennedy.org>
* Makes sure to check any return valuesGravatar Erik Hovland 2008-10-281-1/+2
| | | | | | | | The return value of any function should be checked if that function uses the return value to provide some sort of status information. Signed-off-by: Erik Hovland <erik@hovland.org> Signed-off-by: Dan Dennedy <dan@dennedy.org>
* Makes sure a value is returned by the function.Gravatar Erik Hovland 2008-10-281-0/+1
| | | | | | | A function can compile without returning something always. Signed-off-by: Erik Hovland <erik@hovland.org> Signed-off-by: Dan Dennedy <dan@dennedy.org>
* Make sure that we have the right types.Gravatar Erik Hovland 2008-10-282-7/+8
| | | | | | | | When an unsigned type is assigned a signed value, the negatived value is never seen. Signed-off-by: Erik Hovland <erik@hovland.org> Signed-off-by: Dan Dennedy <dan@dennedy.org>
* Compare unsigned values instead of subtracting them.Gravatar Erik Hovland 2008-10-281-2/+3
| | | | | | | Unsigned values do not return signed values when subtracted and the right operand is larger then the left operand. Signed-off-by: Dan Dennedy <dan@dennedy.org>
* Protect against resource leaks.Gravatar Erik Hovland 2008-10-282-4/+11
| | | | | Signed-off-by: Erik Hovland <erik@hovland.org> Signed-off-by: Dan Dennedy <dan@dennedy.org>
* Make sure variables are initialized before used.Gravatar Erik Hovland 2008-10-281-1/+2
| | | | | Signed-off-by: Erik Hovland <erik@hovland.org> Signed-off-by: Dan Dennedy <dan@dennedy.org>
* dispatch.c: fix a memory leak on not deleting the raw1394 wrapper handle.Gravatar Dan Dennedy 2008-07-211-1/+2
|
* configure.ac, Makefile.am: drop debian from build and restore doc and toolsv2.0.0Gravatar Dan Dennedy 2008-07-182-3/+1
| | | | to dist make target.
* NEWS: added release notesGravatar Dan Dennedy 2008-07-182-1/+5
| | | | Makefile.am: use git-log to generate ChangeLog on make dist.
* Reset the libtool age.Gravatar Dan Dennedy 2008-07-182-2/+5
|
* Change handle validation to prevent segfault and be more informative.Gravatar Dan Dennedy 2008-07-065-69/+314
|
* Fix raw1394_read_cycle_timer after juju integrationGravatar Stefan Richter 2008-07-054-1/+33
| | | | | | | | The ieee1394 version of raw1394_read_cycle_timer() fell over the cliff in "First cut at integrating juju". This brings it back and adds a juju version of it. Also correct a typo in the inline documentation: s/get/read/
* Plug dir leak and initialize data structsGravatar Philippe Troin 2008-07-053-1/+17
| | | | | | | | | | | | | | While trying to track down some crashes in kino, I found the following problems with libraw1394: * There is a DIR* leak in raw1394_set_port(). * Lots of data structures are not fully initialized when calling IEEE1394 ioctl()s. These cause valgrind errors (benign, as valgrind does not know how to interpret all ioctls. However these also cause kino to crash in libraw1394. I've added a bunch of memset()s to prevent this problem from happening. Forward-ported to libraw1394 git tree by Jarod Wilson.
* Move the source code files in the juju directory into the src directory andGravatar Dan Dennedy 2008-04-309-25/+18
| | | | give them 'fw' names instead of 'juju.'
* libraw1394.sgml, raw1394.h: remove information about deprecated isochronousGravatar Dan Dennedy 2008-04-293-443/+29
| | | | API that has been removed.
* juju/raw1394-iso.c: bugfix size of mmap'ed isochronous buffer to preventGravatar Dan Dennedy 2008-04-291-2/+2
| | | | segfault in applications.
* First cut at integrating jujuGravatar Dan Dennedy 2008-04-2318-672/+1208
| | | | This is currently working with legacy ieee1394 and tools/testlibraw.
* Fix configure.ac missing fi after initial merge.Gravatar Dan Dennedy 2008-04-221-0/+1
|
* Merge commit 'krh/juju'Gravatar Dan Dennedy 2008-04-228-19/+2196
|\ | | | | | | | | | | Conflicts: configure.ac
| * Set handle->iso.packets to NULL after freeing to avoid double-frees.Gravatar Jarod Wilson 2007-10-241-0/+5
| |
| * Update the juju implementation to follow the recent bitfield changes.Gravatar Kristian Høgsberg 2007-06-132-16/+9
| |
| * Follow ioctl changes and header file move.Gravatar Kristian Høgsberg 2007-04-172-3/+12
| |
| * Use correct payload size for two-operand lock transactions.Gravatar Jay Fenlason 2007-04-121-2/+2
| |
| * Use power-of-two max packet sizes.Gravatar Kristian Høgsberg 2007-04-121-1/+13
| |
| * Wrap receive tail pointer correctly.Gravatar Kristian Høgsberg 2007-04-121-1/+2
| |
| * Refactor packet queueing and use for both xmit and recv.Gravatar Kristian Høgsberg 2007-04-112-129/+54
| |
| * Fix warnings.Gravatar Kristian Høgsberg 2007-04-032-11/+17
| |
| * Implement raw1394_iso_xmit_sync(), remove debug code.Gravatar Kristian Høgsberg 2007-04-031-10/+33
| |
| * Handle rawiso dispositions.Gravatar Kristian Høgsberg 2007-04-031-7/+37
| |
| * Fix xmit payload packing, use pointers for circular buffer indices.Gravatar Kristian Høgsberg 2007-04-032-63/+58
| |
| * Make raw1394_iso_xmit_write work.Gravatar Kristian Høgsberg 2007-04-032-38/+98
| |
| * More work on iso receive; handle payload wrapping.Gravatar Kristian Høgsberg 2007-04-022-16/+28
| |
| * Decode iso headers properly.Gravatar Kristian Høgsberg 2007-03-311-8/+11
| |
| * Get rawiso receive a little closer to working.Gravatar Kristian Høgsberg 2007-03-283-58/+127
| |
| * Add the juju support work so far.Gravatar Kristian Høgsberg 2007-03-268-19/+2053
| |