qpid-proton mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Goulish <mgoul...@redhat.com>
Subject another proton error question
Date Tue, 17 Sep 2013 14:57:39 GMT

OK, so now I understand that we are using the standard errno philosophy in which:

  errno always contains the most recent error from anywhere within messenger code.
  ( and is iniialized to 0 on creation of messenger struct. )



But another part of this philosophy is:

  No system call (in our case, translate that to 'Messenger API call' or maybe 'Messenger
function') ever sets
errno to zero.


Yet, I am seeing it get set to zero, sometimes.  ( The only fn I have actually observed
doing this so far is  pn_output_write_amqp(), but there may be others )

Is there a reason why we depart from the standard errno philosophy here?
Or is it just an oversight?


If it's an oversight, I'd like to put something like 

  assert(code);

as the first line in pn_error_set().



If it's not an oversight, I'd like to know the reasoning so I can document it.



Mime
View raw message