2007-05-10: EV dixit:
> 2007-05-09: Bob Copeland dixit:
> > Are there any outstanding bugs/features that are needed for 
> > another release of libkarma?  I'd like to update my various 
> > bits of documentation to point to a new version and close out a 
> > banshee bug or two.
> 
> I wanted to fix the second of the two issues that may fail when 
> using two RKs simultaneously in the same machine (the first one
> is less problematic [...]

Here it is.  I could not test it completely as I don't have my
second cradle at hand now (I nedd two cradles to test two
simultaneous uploads to two different ethernet-connected RKs);
but the patch is very simple and it should just work.

The first of the problems I reported (automatic detection of
ethernet interfaces) is not as easy for me, as it needs some work
on the ssdp.c code, which I am not familiar with.  Franky, if you
have some time to have a look at it, I'll be glad to test (and
debug ;) your code with my two RKs.

If you decide to postpone the ssdp.c patch and to make the
current version the libkarma-0.0.7 tag version, please let me
know, so I will upload it to the linux-karma SF site and make an
anouncement in the Latest News page.

Best,
EV.
# HG changeset patch
# User [EMAIL PROTECTED]
# Date 1179095588 -7200
# Node ID 31880aa95645990db787d6ee46f83b4aaa8ca9db
# Parent  bd51f811f367a4d464a32d274d4962be68da520d
Make temporoary filename unique in lk_rio_create_temp_file()

diff -r bd51f811f367 -r 31880aa95645 src/rio_rw.c
--- a/src/rio_rw.c      Sat Apr 14 01:43:34 2007 +0200
+++ b/src/rio_rw.c      Mon May 14 00:33:08 2007 +0200
@@ -217,11 +217,12 @@ static char *lk_rio_create_temp_file(int
     if (ret != 0 || got != blk)
         goto err;
 
-    len = strlen(karma_tmpdir) + strlen(simple_itoa(fid)) + 8;
-    filename = malloc(len);
-    snprintf(filename, len, "%s/lkarma%d", karma_tmpdir, fid);
-
-    fd = open(filename, O_WRONLY|O_CREAT|O_EXCL, 0600);
+    len = strlen(karma_tmpdir) + strlen("/lkarmaXXXXXX");
+    filename = malloc(len+1);
+    strcpy(filename, karma_tmpdir);
+    strcat(filename, "/lkarmaXXXXXX");
+
+    fd = mkstemp(filename); /* filename X's are replaced with a unique string 
*/
     if (fd == -1)
         goto err;
 
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
linux-karma-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-karma-devel

Reply via email to