Commit Graph

253 Commits

Author SHA1 Message Date
Dan Dennedy 0c1ddb9be2 Checking /dev/raw1394 and recommendation for creating it for the install make target is no longer relevant because opf firewire and udev.
Signed-off-by: Dan Dennedy <dan@dennedy.org>
2008-12-07 23:43:49 -08:00
Stefan Richter 38a43c2736 testlibraw: test raw1394_read_cycle_timer()
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Dan Dennedy <dan@dennedy.org>
2008-12-07 23:10:17 -08:00
Stefan Richter b63022aeeb testlibraw: test all cards instead of only the first
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Dan Dennedy <dan@dennedy.org>
2008-12-07 23:09:09 -08:00
Dan Dennedy 4904ff698d Let fw_read_cycle_timer() use the local fd instead of requiring iso to be initialized
Signed-off-by: Dan Dennedy <dan@dennedy.org>
2008-12-07 23:02:27 -08:00
Stefan Richter fbe1fa46c6 [libraw1394 patch] Unify {ieee1394,fw}_bandwidth_modify()
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>
2008-12-03 19:56:36 -08:00
Stefan Richter 788442d403 [libraw1394 patch] Fix raw1394_channel_modify() on firewire-core
(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>
2008-12-03 19:56:32 -08:00
Stefan Richter 7b8d270352 Fix segfault in juju's handle_arm_request
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>
2008-10-28 22:56:48 -07:00
Stefan Richter 0bf8132319 Reduce nesting depth in new_handle dispatchers
Signed-off-by: Dan Dennedy <dan@dennedy.org>
2008-10-28 22:56:32 -07:00
Stefan Richter d080bb3d83 Address some compiler warnings
7x unused variable, 1x assignment used as truth value, 1x pointer signedness

Signed-off-by: Dan Dennedy <dan@dennedy.org>
2008-10-28 22:56:09 -07:00
Erik Hovland 531b0787f1 Makes extra sure strings are not overrun.
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>
2008-10-28 22:52:41 -07:00
Erik Hovland 1e532a7f9f Makes sure to check any return values
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>
2008-10-28 22:52:39 -07:00
Erik Hovland 63b9d38820 Makes sure a value is returned by the function.
A function can compile without returning something always.

Signed-off-by: Erik Hovland <erik@hovland.org>
Signed-off-by: Dan Dennedy <dan@dennedy.org>
2008-10-28 22:52:34 -07:00
Erik Hovland 038f5f5c98 Make sure that we have the right types.
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>
2008-10-28 22:52:32 -07:00
Erik Hovland 8ad324c971 Compare unsigned values instead of subtracting them.
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>
2008-10-28 22:52:29 -07:00
Erik Hovland 709d8791ce Protect against resource leaks.
Signed-off-by: Erik Hovland <erik@hovland.org>
Signed-off-by: Dan Dennedy <dan@dennedy.org>
2008-10-28 22:52:06 -07:00
Erik Hovland 378b935fa3 Make sure variables are initialized before used.
Signed-off-by: Erik Hovland <erik@hovland.org>
Signed-off-by: Dan Dennedy <dan@dennedy.org>
2008-10-28 22:52:04 -07:00
Dan Dennedy 6747abb057 dispatch.c: fix a memory leak on not deleting the raw1394 wrapper handle. 2008-07-21 22:01:03 -07:00
Dan Dennedy 99e9f575bf configure.ac, Makefile.am: drop debian from build and restore doc and tools
to dist make target.
2008-07-18 02:13:41 -07:00
Dan Dennedy e90c205d1b NEWS: added release notes
Makefile.am: use git-log to generate ChangeLog on make dist.
2008-07-18 01:54:38 -07:00
Dan Dennedy 28f20b3e15 Reset the libtool age. 2008-07-18 01:08:30 -07:00
Dan Dennedy 8f942654d9 Change handle validation to prevent segfault and be more informative. 2008-07-06 12:06:40 -07:00
Stefan Richter 4ce429a797 Fix raw1394_read_cycle_timer after juju integration
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/
2008-07-05 13:16:30 -07:00
Philippe Troin 477b6eee6d Plug dir leak and initialize data structs
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.
2008-07-05 13:09:29 -07:00
Dan Dennedy f9681ff59d Move the source code files in the juju directory into the src directory and
give them 'fw' names instead of 'juju.'
2008-04-30 14:37:28 -07:00
Dan Dennedy 3b4d2eed60 libraw1394.sgml, raw1394.h: remove information about deprecated isochronous
API that has been removed.
2008-04-29 23:09:22 -07:00
Dan Dennedy 832c9c3d89 juju/raw1394-iso.c: bugfix size of mmap'ed isochronous buffer to prevent
segfault in applications.
2008-04-29 17:27:00 -07:00
Dan Dennedy 0ea462ae98 First cut at integrating juju
This is currently working with legacy ieee1394 and tools/testlibraw.
2008-04-23 17:44:36 -07:00
Dan Dennedy 919e399936 Fix configure.ac missing fi after initial merge. 2008-04-22 10:54:00 -07:00
Dan Dennedy 7c4d497054 Merge commit 'krh/juju'
Conflicts:

	configure.ac
2008-04-22 10:51:50 -07:00
Dan Dennedy 7c3faea62a Merge branch 'master' of dennedy.org:git/dennedy.org/libraw1394 2008-03-27 15:13:42 -07:00
ddennedy 342b660afa src/eventloop.c: redo the undo (git-svn virgin at the controls)
git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@179 53a565d1-3bb7-0310-b661-cf11e63c67ab
2008-03-27 21:32:51 +00:00
Dan Dennedy bf7527e19a Merge branch 'master' of dennedy.org:git/dennedy.org/libraw1394 2008-03-27 14:06:07 -07:00
ddennedy 4ce7f7d8f0 eventloop.c: apply patch from Jonas Bonn to retrty read when failed with EINTR.
This can occur when libraw1394 callera receives a signal while in the read and
the caller is not using a signal handler set with signal().


git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@178 53a565d1-3bb7-0310-b661-cf11e63c67ab
2008-03-27 20:25:26 +00:00
ddennedy 8bb915dd16 eventloop.c: apply patch from Jonas Bonn to retry read when failed with EINTR.
This can occur when libraw1394 caller receives a signal while in this read and
the caller is not using a signal handler set with signal().


git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@177 53a565d1-3bb7-0310-b661-cf11e63c67ab
2008-03-27 20:25:23 +00:00
Dan Dennedy a118281f85 eventloop.c: apply patch from Jonas Bonn to retry read when failed with EINTR.
This can occur when libraw1394 caller receives a signal while in this read and
the caller is not using a signal handler set with signal().
2008-03-27 09:48:02 -07:00
Jarod Wilson 8085c633bc Set handle->iso.packets to NULL after freeing to avoid double-frees. 2007-10-24 16:50:24 -04:00
ddennedy 77b6ef1f9e fix documentation on raw1394_update_config_rom
git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@175 53a565d1-3bb7-0310-b661-cf11e63c67ab
2007-10-14 01:46:08 +00:00
ddennedy 5efd221f57 add Pieter Palmers to AUTHORS as contributor
git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@174 53a565d1-3bb7-0310-b661-cf11e63c67ab
2007-10-14 01:41:30 +00:00
ddennedy ec911fc60d update release notes
git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@173 53a565d1-3bb7-0310-b661-cf11e63c67ab
2007-10-14 01:35:16 +00:00
Kristian Høgsberg 78a77758c7 Update the juju implementation to follow the recent bitfield changes. 2007-06-13 18:31:59 -04:00
ddennedy c65a1c3ad8 Apply patch from Jon Schewe <jon.schewe@honeywell.com> to make valgrind happy. Adds --with-valgrind configure option.
git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@172 53a565d1-3bb7-0310-b661-cf11e63c67ab
2007-05-30 05:11:30 +00:00
Kristian Høgsberg fcba731c21 Follow ioctl changes and header file move. 2007-04-17 20:06:14 -04:00
Jay Fenlason c896d53c99 Use correct payload size for two-operand lock transactions. 2007-04-12 14:39:24 -04:00
Kristian Høgsberg 7096501f0d Use power-of-two max packet sizes. 2007-04-12 14:11:48 -04:00
Kristian Høgsberg fb1570efbf Wrap receive tail pointer correctly. 2007-04-12 14:11:20 -04:00
Kristian Høgsberg 194edcc9cd Refactor packet queueing and use for both xmit and recv. 2007-04-11 18:22:36 -04:00
Kristian Høgsberg d9fd708f82 Fix warnings. 2007-04-03 22:15:54 -04:00
Kristian Høgsberg 760378898f Implement raw1394_iso_xmit_sync(), remove debug code. 2007-04-03 22:07:40 -04:00
Kristian Høgsberg 18c6919398 Handle rawiso dispositions. 2007-04-03 21:23:08 -04:00
Kristian Høgsberg 7e50d28e8a Fix xmit payload packing, use pointers for circular buffer indices. 2007-04-03 21:00:06 -04:00