wrong file open mode "PJ_O_APPEND"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
I try to open a file with "PJ_O_APPEND" mode in android system,
but I got "PJ_EINVAL".
I hacked in the source codes and found the reason:

in "pj/file_io.h" file:
PJ_O_APPEND     = 0x1108

and in "pj/file_io_ansi.c":
if ((flags & PJ_O_WRONLY) == PJ_O_WRONLY) {
            *p++ = 'a';
            if ((flags & PJ_O_RDONLY) == PJ_O_RDONLY)
                *p++ = '+';
        }

when the flags = PJ_O_APPEND,  the conditions are false,
so no values are set to p, and then goto the following line:
if (p==mode)
        return PJ_EINVAL;

this is why I got PJ_EINVAL when I set mode "PJ_O_APPEND".

And the pjsip version is realsed 2.x.

Is this a bug or is there something I got wrong?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20120718/b82dc958/attachment.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux