Unfortunately, the same true for the version of MBuni I have. I  applied the
patch (with a few changes) to  my version (roughly a 1.4) and tested with
that.

The patch against the CVS version is attached. This isn't actually tested
(with CVS version) though. If I get the time, I will try get into the office

and try it out on a Sun box - if not - I'll get around to it monday. Even if
there might still be issues on Sun, it doesn't change anything on other
systems though.

Note, that I haven't used unlock_and_close everywhere, only the places where
I think it is necessary. Using it everywhere might actually
be destructive to use it everywhere since, fdopen is sometimes called on an
already open (and locked) file descriptor and then closed again, where the
original file descriptor
is still open and should not yet be unlocked.

Regards,
Christian

Attached is a patch against latest cvs.

On Fri, Sep 19, 2008 at 5:40 AM, Jason Pollock <
[EMAIL PROTECTED]> wrote:

> P. A. Bagyenda wrote:
>
>> Jason,
>>
>>  Thanks. It would be nice to see a full patch against latest CVS for this.
>>
>
> As I've said, my version of Mbuni is drastically different from CVS. :)
>  I'll see what I can do.
>
>
>  On Sep 19, 2008, at 02:16, Jason Pollock wrote:
>>
>>  P. A. Bagyenda wrote:
>>>
>>>> Thanks for the review.
>>>>
>>>> If you would, kindly share a non-destructive patch for further
>>>> discussion.
>>>>
>>>
>>> Here are the changes that I applied based on the comments.
>>>
>>>
>>> Index: mms_util.c
>>> ===================================================================
>>> RCS file: /home/cvs/MBUNI/mmlib/mms_util.c,v
>>> retrieving revision 1.4
>>> diff -a -u -r1.4 mms_util.c
>>> --- mms_util.c    10 Sep 2008 04:04:09 -0000    1.4
>>> +++ mms_util.c    18 Sep 2008 23:15:09 -0000
>>> @@ -22,9 +22,9 @@
>>> #include <fcntl.h>
>>> #include <pthread.h>
>>> #include <sys/types.h>
>>> -#include <sys/stat.h>
>>> #endif
>>>
>>> +#include <sys/stat.h>
>>> #include <errno.h>
>>> #include <sys/types.h>
>>> #include <sys/stat.h>
>>> @@ -929,9 +929,8 @@
>>>    key.dev   = buf.st_dev;
>>>
>>>    release_file_lock(fd, &key);
>>> -#else
>>> -    return fclose(fp);
>>> #endif
>>> +    return fclose(fp);
>>> }
>>>
>>> /* Compare a file_lock(lhs) to the file_key(rhs)
>>> _______________________________________________
>>> Devel mailing list
>>> Devel@mbuni.org
>>> http://lists.mbuni.org/mailman/listinfo/devel
>>>
>>
>>
>>
> _______________________________________________
> Devel mailing list
> Devel@mbuni.org
> http://lists.mbuni.org/mailman/listinfo/devel
>

Attachment: sunlock_cvs_patch.diff
Description: Binary data

_______________________________________________
Devel mailing list
Devel@mbuni.org
http://lists.mbuni.org/mailman/listinfo/devel

Reply via email to