On Fri, Jan 17, 2014 at 05:26:26PM +0100, Daniel Willmann wrote:

> -                     LOGP(DSMPP, LOGL_ERROR, "[%s] read returned %d\n",
> -                          esme->system_id, rc);
> +                     /* EINTR is a non-fatal error, just try again */
> +                     if (errno == EINTR)
> +                             return 0;

>               if (rc < 0) {
> -                     LOGP(DSMPP, LOGL_ERROR, "[%s] read returned %d\n",
> -                             esme->system_id, rc);
> +                     LOGP(DSMPP, LOGL_ERROR, "[%s] read returned %d (%s)\n",
> +                             esme->system_id, rc, strerror(errno));
> +                     goto dead_socket;

For reference. you should make the errno check in both cases or just
simplify the reading part and move the error handling to a macro.



Reply via email to