aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_modem.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/chan_modem.c')
-rwxr-xr-xchannels/chan_modem.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/channels/chan_modem.c b/channels/chan_modem.c
index 41d95540b..9a1e2074d 100755
--- a/channels/chan_modem.c
+++ b/channels/chan_modem.c
@@ -709,8 +709,19 @@ static void stty(struct ast_modem_pvt *p)
ast_log(LOG_WARNING, "Unable to get serial parameters on %s: %s\n", p->dev, strerror(errno));
return;
}
+#ifndef SOLARIS
cfmakeraw(&mode);
- cfsetspeed(&mode, B115200);
+#else
+ mode.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP
+ |INLCR|IGNCR|ICRNL|IXON);
+ mode.c_oflag &= ~OPOST;
+ mode.c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
+ mode.c_cflag &= ~(CSIZE|PARENB);
+ mode.c_cflag |= CS8;
+#endif
+
+ cfsetispeed(&mode, B115200);
+ cfsetospeed(&mode, B115200);
if (tcsetattr(p->fd, TCSANOW, &mode))
ast_log(LOG_WARNING, "Unable to set serial parameters on %s: %s\n", p->dev, strerror(errno));