gnokii-commit
[Top][All Lists]
Advanced

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

[SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-30


From: Daniele Forsi
Subject: [SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-301-g69ef4d6
Date: Wed, 03 Aug 2011 19:44:35 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "libgnokii and core programs".

The branch, master has been updated
       via  69ef4d66dab12e77e4008381d41ade848ce5dc36 (commit)
      from  4d0149f3b24e34cb98c77b40c906239f593529b0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/gnokii.git/commit/?id=69ef4d66dab12e77e4008381d41ade848ce5dc36


commit 69ef4d66dab12e77e4008381d41ade848ce5dc36
Author: Daniele Forsi <address@hidden>
Date:   Wed Aug 3 21:42:18 2011 +0200

    Apply to the file module the changes from commit 
ff3c16272faf192690521674f318d20691c6ade1
    
    Without this change smsd with --module file was using 100% CPU.

diff --git a/smsd/ChangeLog b/smsd/ChangeLog
index f16a707..8d9bb68 100644
--- a/smsd/ChangeLog
+++ b/smsd/ChangeLog
@@ -1,3 +1,8 @@
+* Wed 03 Aug 2011 Daniele Forsi
+- Apply the changes in patch from 28 May 2011 also to the file module. (Bug
+  report by tanker on #gnokii).
+
+
 * Sat 28 May 2011 Jan Derfinak
 - After patch from 09 Apr 2011, the query interval for looking to outbox was
   too small and smsd overloads db server. Added 5 seconds sleep if outbox
diff --git a/smsd/file.c b/smsd/file.c
index b6c0146..1c46140 100644
--- a/smsd/file.c
+++ b/smsd/file.c
@@ -148,22 +148,23 @@ GNOKII_API gint DB_InsertSMS (const gn_sms * const data, 
const gchar * const pho
 }
 
 
-GNOKII_API void DB_Look (const gchar * const phone)
+GNOKII_API gint DB_Look (const gchar * const phone)
 {
   DIR *dir;
   struct dirent *dirent;
   FILE *smsFile;
   GString *buf;
   gint numError, error;
+  gint empty = 1;
 
 
   if (spool[0] == '\0')  // if user don't set spool dir, sending is disabled
-    return;
+    return (SMSD_NOK);
     
   if ((dir = opendir (spool)) == NULL)
   {
     g_print (_("Cannot open directory %s\n"), spool);
-    return;
+    return (SMSD_NOK);
   }
 
   buf = g_string_sized_new (64);
@@ -185,6 +186,7 @@ GNOKII_API void DB_Look (const gchar * const phone)
       continue;
     }
     
+    empty = 0;
     gn_sms_default_submit (&sms);
     memset (&sms.remote.number, 0, sizeof (sms.remote.number));
 
@@ -261,4 +263,9 @@ GNOKII_API void DB_Look (const gchar * const phone)
   
   g_string_free (buf, TRUE);
   closedir (dir);
+
+  if (empty)
+    return (SMSD_OUTBOXEMPTY);
+  else
+    return (SMSD_OK);
 }

-----------------------------------------------------------------------

Summary of changes:
 smsd/ChangeLog |    5 +++++
 smsd/file.c    |   13 ++++++++++---
 2 files changed, 15 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
libgnokii and core programs



reply via email to

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