From f8a0789ffc3f4fb2204cf7c5abe7aed453fd1565 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Sat, 20 Aug 2011 13:59:29 +0000 Subject: [PATCH] Support rates of 230400 bauds and prepare to report on unsupported API calls --- src/modems/hayes.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/modems/hayes.c b/src/modems/hayes.c index cf4242c..5237c62 100644 --- a/src/modems/hayes.c +++ b/src/modems/hayes.c @@ -287,6 +287,8 @@ static HayesCommandStatus _on_request_message_send(HayesCommand * command, HayesCommandStatus status, void * priv); static HayesCommandStatus _on_request_model(HayesCommand * command, HayesCommandStatus status, void * priv); +static HayesCommandStatus _on_request_unsupported(HayesCommand * command, + HayesCommandStatus status, void * priv); static void _on_trigger_call_error(ModemPlugin * modem, char const * answer); static void _on_trigger_cbc(ModemPlugin * modem, char const * answer); @@ -499,7 +501,7 @@ static HayesRequestHandler _hayes_request_handlers[] = { MODEM_REQUEST_REGISTRATION, NULL, _on_request_generic }, /* FIXME really track */ { MODEM_REQUEST_UNSUPPORTED, NULL, - _on_request_generic } + _on_request_unsupported } }; static HayesTriggerHandler _hayes_trigger_handlers[] = @@ -1826,6 +1828,8 @@ static unsigned int _reset_configure_baudrate(ModemPlugin * modem, return B57600; case 115200: return B115200; + case 230400: + return B230400; case 460800: return B460800; case 921600: @@ -2361,6 +2365,15 @@ static HayesCommandStatus _on_request_model(HayesCommand * command, } +/* on_request_unsupported */ +static HayesCommandStatus _on_request_unsupported(HayesCommand * command, + HayesCommandStatus status, void * priv) +{ + /* FIXME report an unsupported event with the result of the command */ + return _on_request_generic(command, status, priv); +} + + /* on_trigger_call_error */ static void _on_trigger_call_error(ModemPlugin * modem, char const * answer) {