gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fake mode for testing AT sms-es


From: Pavel Machek
Subject: Fake mode for testing AT sms-es
Date: Tue, 30 Apr 2002 10:40:59 +0200
User-agent: Mutt/1.3.28i

Hi!

Seems to me AT smses are pretty badly tested because it costs money to
test it. Well, with dry_run = 1 you can test without paying money to
your provider. Okay to commit?
                                                                Pavel

Index: common/phones/atgen.c
===================================================================
RCS file: /cvsroot/gnokii/gnokii/common/phones/atgen.c,v
retrieving revision 1.31
diff -u -u -r1.31 atgen.c
--- common/phones/atgen.c       29 Apr 2002 15:35:03 -0000      1.31
+++ common/phones/atgen.c       30 Apr 2002 08:16:45 -0000
@@ -37,6 +37,7 @@
 #include "gsm-common.h"
 #include "gsm-statemachine.h"
 #include "gsm-encoding.h"
+#include "cfgreader.h"
 #include "phones/generic.h"
 #include "phones/atgen.h"
 #include "phones/ateric.h"
@@ -639,6 +640,10 @@
        req[data->RawData->Length * 2] = 0x1a;
        req[data->RawData->Length * 2 + 1] = 0;
        dprintf("Sending frame: %s\n", req);
+       if (CFG_Get(CFG_Info, "global", "dry_run")) {
+               fprintf(stdout, "dry_run: [%s]\n", req);
+               return GE_NONE;
+       }
        if (SM_SendMessage(state, strlen(req), GOP_SendSMS, req) != GE_NONE) 
return GE_NOTREADY;
        return SM_BlockNoRetry(state, data, GOP_SendSMS);
 }

-- 
(about SSSCA) "I don't say this lightly.  However, I really think that the U.S.
no longer is classifiable as a democracy, but rather as a plutocracy." --hpa



reply via email to

[Prev in Thread] Current Thread [Next in Thread]