Re: [PATCH] Fix siemenssatnetmon
Daniel Glöckner <[email protected]>
| Newsgroups | gmane.linux.drivers.gammu |
|---|---|
| Message-ID | <[email protected]> |
Any comments? On Tue, Nov 04, 2014 at 12:04:27AM +0100, Daniel Glöckner wrote: > The siemenssatnetmon command has been broken since 9ec31586756a96, > which adds checks for errors, as ATSIEMENS_Reply_GetSAT always > returns an error when called in AT_Reply_SMSEdit state. Fix that. > > Tested in combination with a Siemens S55. > > Signed-off-by: Daniel Glöckner <[email protected]> > --- > gammu/depend/siemens/dsiemens.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/gammu/depend/siemens/dsiemens.c b/gammu/depend/siemens/dsiemens.c > index f7b9b3c..cb43efc 100644 > --- a/gammu/depend/siemens/dsiemens.c > +++ b/gammu/depend/siemens/dsiemens.c > @@ -37,8 +37,12 @@ GSM_Error ATSIEMENS_Reply_GetSAT(GSM_Protocol_Message *msg, GSM_StateMachine *sm > int freq_tmp,frequency[24]; > GSM_NetworkInfo Network; > > - if (Priv->ReplyState!=AT_Reply_OK) return ERR_UNKNOWN; > - if (sm->Protocol.Data.AT.EditMode) sm->Protocol.Data.AT.EditMode = FALSE; > + if (Priv->ReplyState==AT_Reply_SMSEdit) { > + sm->Protocol.Data.AT.EditMode = FALSE; > + return ERR_NONE; > + } > + if (Priv->ReplyState!=AT_Reply_OK || sm->Protocol.Data.AT.EditMode) > + return ERR_UNKNOWN; > if (strstr(GetLineString(msg->Buffer,&Priv->Lines,2),"SSTK")) { > length = strlen(GetLineString(msg->Buffer,&Priv->Lines,2))-7; > DecodeHexBin(buf, GetLineString(msg->Buffer,&Priv->Lines,2)+7,length); > -- > 1.8.3.4 > ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ Gammu-users mailing list - https://lists.sourceforge.net/lists/listinfo/gammu-users