Don't overwrite errorcodes

This commit is contained in:
Andreas Öman 2010-06-17 18:31:13 +00:00
parent 93affec3ea
commit c3e32c02fc

View file

@ -422,7 +422,10 @@ transport_find(channel_t *ch, unsigned int weight, const char *loginfo,
return t;
*errorp = r;
}
*errorp = err ?: SM_CODE_NO_TRANSPORT;
if(err)
*errorp = err;
else if(*errorp == 0)
*errorp = SM_CODE_NO_TRANSPORT;
return NULL;
}