gnokii-users
[Top][All Lists]
Advanced

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

RE: smsd fix


From: Jan Derfinak
Subject: RE: smsd fix
Date: Mon, 5 Aug 2002 14:42:16 +0200 (CEST)

On Sat, 3 Aug 2002, Edward Finlayson wrote:

> smsd was started as above and once in the loop shown the following command 
> was run on MySQL:
> 
> mysql> INSERT INTO outbox SET number='+447719792316', text='Test from smsd';
> Query OK, 1 row affected (0.00 sec)
> 
> mysql> select * from outbox;
> +----+---------------+----------------+----------------+----------------+-----------+-------+---------------------+-----------
>   
> +----------+
> | id | number        | processed_date | insertdate     | text           | 
> processed | error | invoicedate         | invoiceid | 
> invoiced |
> +----+---------------+----------------+----------------+----------------+-----------+-------+---------------------+-----------
>   
> +----------+
> |  1 | +447719792316 | 20020803150607 | 00000000000000 | Test from smsd |     
>     0 |    -1 | 0000-00-00 00:00:00 |         0 | 
>        0 |
> +----+---------------+----------------+----------------+----------------+-----------+-------+---------------------+-----------
>   
> +----------+
> 1 row in set (0.00 sec)
> 
> mysql>
> 


If you are created outbox table with included script and you set insertdate
to null, mysql insert current date to insertdate:

insert into outbox (number, insertdate, text) values ('+447719792316', NULL, 
'sk4');

mysql> select * from outbox;
+----+---------------+----------------+----------------+------+-----------+-------+
| id | number        | processed_date | insertdate     | text | processed 
|error  |
+----+---------------+----------------+----------------+------+-----------+-------+
|  4 | +447719792316 | 20020805141145 | 20020805141139 | sk4  |         1 |0    
  |
+----+---------------+----------------+----------------+------+-----------+-------+

Smsd don't touch insertdate. It changes processed_date to time when sms is
processed, then you can see how long is the time between inserting and
sending. Smsd also change processed to 1. If you want to resend sms you can
simply change processed to 0 (or insert sms again, this is better when you
want archive all outgoing sms's).

> B.T.W 
> 
> RedHat 7.2
> GNOKII 0.4.2a
> MySQL 3.23.41
> 

RedHat 7.3
Gnokii from cvs
mysql-3.23.49-3

                                jano

-- 




reply via email to

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