Commit Graph

194 Commits

Author SHA1 Message Date
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
Kristian Høgsberg aa70f855b3 Make raw1394_iso_xmit_write work. 2007-04-03 13:31:36 -04:00
Kristian Høgsberg d9b43daf48 More work on iso receive; handle payload wrapping. 2007-04-02 17:33:07 -04:00
Kristian Høgsberg 89281b5767 Decode iso headers properly. 2007-03-31 19:45:39 -04:00
Kristian Høgsberg 429167e36a Get rawiso receive a little closer to working. 2007-03-28 22:55:21 -04:00
Kristian Høgsberg 5659d28c2d Add the juju support work so far. 2007-03-26 16:49:12 -04:00
ddennedy 1f1549c6ad add documentation about existence of RAW1394DEV
git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@171 53a565d1-3bb7-0310-b661-cf11e63c67ab
2007-02-17 02:30:13 +00:00
ddennedy 4a129dd960 add support for RAW1394DEV environment variable to override default /dev/raw1394, but also attempt to failover to default.
git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@170 53a565d1-3bb7-0310-b661-cf11e63c67ab
2007-02-17 02:24:16 +00:00
ddennedy fa981a8b96 added raw1394_read_cycle_timer, contributed by Pieter Palmers
git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@169 53a565d1-3bb7-0310-b661-cf11e63c67ab
2007-02-14 05:29:18 +00:00
ddennedy 3a35307a85 bugfix segfault in raw1394_iso_shutdown on no iso activity due to not initializing raw1394_handle.iso_packet_infos to NULL in raw1394_new_handle
git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@168 53a565d1-3bb7-0310-b661-cf11e63c67ab
2006-10-17 03:39:37 +00:00