Skip to content

Commit

Permalink
Fix post_msg implementation bug
Browse files Browse the repository at this point in the history
I think the error handling code of `post_msg` is wrongly implemented due to coding typo. The `EPIPE` should be also considered and then return -1, just like `PPTP_write`:
https://github.com/xebd/accel-ppp/blob/1b8711cf75a7c278d99840112bc7a396398e0205/accel-pppd/ctrl/pptp/pptp.c#L539-L570

This pr fixes xebd#158.
  • Loading branch information
grandnew authored Jan 7, 2022
1 parent 1b8711c commit a0b8bfc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion accel-pppd/ctrl/pptp/pptp.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ static int post_msg(struct pptp_conn_t *conn, void *buf, int size)
if (errno != EPIPE) {
if (conf_verbose)
log_ppp_info2("pptp: write: %s\n", strerror(errno));
return -1;
}
return -1;
}
}

Expand Down

0 comments on commit a0b8bfc

Please sign in to comment.