[1/2]: Patch smsd/sqlite: Several bug fixes / optimizations

Pedro Aguilar <[email protected]>
Newsgroups gmane.linux.drivers.gnokii
Message-ID <CAEWWn28DMb=y_7tC=wCTPWGiG0r-TyVqri8Sh4L85Du9VgVXMg@mail.gmail.com>
Hi,

This patch skips the sleep(1) when there was no error in WriteSMS().

Regards,
-- 
Pedro Aguilar
http://www.paguilar.org/blog

_______________________________________________
gnokii-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/gnokii-users
02_skip_sleep_writesms_ok.patch (application/octet-stream, 394 B)
--- a/smsd/sqlite.c	2013-03-21 11:52:26.637234983 +0100
+++ b/smsd/sqlite.c	2013-03-21 11:55:49.925239806 +0100
@@ -207,6 +207,8 @@
         numError = 0;
         do {
             error = WriteSMS(&sms);
+			if ((error != GN_ERR_TIMEOUT && error != GN_ERR_FAILED))
+				break;
             sleep(1);
         } while ((error == GN_ERR_TIMEOUT || error == GN_ERR_FAILED) && numError++ < 3);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.