Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tcf-dev] set_error_report_errno()

Hi,

Right. Sorry, missed that.

 

Thanks,

Claes

 

From: tcf-dev-bounces@xxxxxxxxxxx [mailto:tcf-dev-bounces@xxxxxxxxxxx] On Behalf Of Eugene Tarassov
Sent: Thursday, June 30, 2016 7:12 PM
To: TCF Development <tcf-dev@xxxxxxxxxxx>
Subject: Re: [tcf-dev] set_error_report_errno()

 

Hi Claes,

 

If report is not NULL, errno is set by alloc_msg() function.

 

Regards,

Eugene

 

From: tcf-dev-bounces@xxxxxxxxxxx [mailto:tcf-dev-bounces@xxxxxxxxxxx] On Behalf Of Lillieskold, Claes
Sent: Thursday, June 30, 2016 1:27 AM
To: TCF Development
Subject: [tcf-dev] set_error_report_errno()

 

Hi,

While developing a symbol service, I see calls to set_error_report_errno().

This function claims to set and return errno from the given report.

But from what I can see in the code, errno is always set to zero and always returns zero.

 

If this is correct, then I must have misread something, please inform me.

But if it is a bug, I guess that fixing it (setting and returning non-zero errno) would have

consequences since set_error_report_errno() seems to be heavily used.

 

Best regards,

Claes

 

errors.h:

/*

* Set errno to indicate TCF standard error report.

* Report objects are kept in a queue of limited size, and old reports are

* disposed by calling release_error_report().

* Clients should not rely on reports being kept in the queue longer then one dispatch cycle.

* Persistent error report can be obtained by calling get_error_report().

* Return new value of errno.

*/

extern int set_error_report_errno(ErrorReport * report);

 

errors.c:

int set_error_report_errno(ErrorReport * r) {

    errno = 0;

    if (r != NULL) {

        ReportBuffer * report = (ReportBuffer *)((char *)r - offsetof(ReportBuffer, pub));

        ErrorMessage * m = alloc_msg(SRC_REPORT);

        m->error = report->pub.code + STD_ERR_BASE;

        m->report = report;

        report->refs++;

    }

    return errno;

}

 

----------------------------------------------------------------------
Intel Sweden AB
Registered Office: Isafjordsgatan 30B, 164 40 Kista, Stockholm, Sweden
Registration Number: 556189-6027

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.



This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.

----------------------------------------------------------------------
Intel Sweden AB
Registered Office: Isafjordsgatan 30B, 164 40 Kista, Stockholm, Sweden
Registration Number: 556189-6027

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


Back to the top