On Wed, 2011-10-19 at 20:18 +0700, Benny Prijono wrote: > On Tue, Oct 18, 2011 at 2:33 PM, Dan <dan at keystream.se> wrote: > > Hi, > > when setting TRACE_JB to 1 in stream.c a trace file is created with the > > following call: > > pj_file_open(pool, trace_name, PJ_O_RDWR, &stream->trace_jb_fd); > > > > This will in turn cause a call to fopen with the mode set to "r+b" which > > won't create the file if it doesn't exist (at least on Linux, the > > situation might be different on Windows). If we instead call > > pj_file_open() with the parameter PJ_O_WRONLY the mode in the call to > > fopen will be "wb" which will indeed create the file if it doesn't > > exist. > > I'm attaching a patch file which will replace PJ_O_RDWR with > > PJ_O_WRONLY. > > > > I see, so that's the problem! Did it also return PJ_SUCCESS when it > fails to create the file? That sounds like another bug. No, pj_file_open() didn't return PJ_SUCCESS and I could see an error message in the log. So the error handling seems to work as it should. > > Anyway I just committed your patch in r3831. Thanks! > > Thanks! > Benny > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip at lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org