Hi list,

something mysterious has happend after commiting cimd2_smsc2.c patches
written by Angel Fradejas. there were problems with sleep times and Angel
wrote the final patch (file was called cimd2_fix2.diff) and it was
commited by Stipe. recently I did cvs update and seems like most recent
fix wasn't applied or was applied incorrectly?

attached patch fixes these sleep times (it's made with older
smsc_cimd2.c).

if I'm wrong, Stipe and Angel, please correct me.

it's my first patch don't even written by myself, so corrections are
welcome :)

regards,
Dziugas Baltrunas
Index: gw/smsc/smsc_cimd2.c
===================================================================
RCS file: /home/cvs/gateway/gw/smsc/smsc_cimd2.c,v
retrieving revision 1.8
diff -u -r1.8 smsc_cimd2.c
--- gw/smsc/smsc_cimd2.c        27 Mar 2003 09:09:10 -0000      1.8
+++ gw/smsc/smsc_cimd2.c        31 Mar 2003 09:28:32 -0000
@@ -2068,7 +2068,7 @@
     Msg       *msg;
     SMSCConn  *conn = arg;
     PrivData *pdata = conn->data;
-    double    sleep;
+    double    sleep = 0.0001;
 
     /* Make sure we log into our own log-file if defined */
     log_thread_to(conn->log_idx);
@@ -2097,8 +2097,6 @@
             mutex_unlock(conn->flow_mutex);
         }
 
-        sleep = 0.0001;
-        
         /* receive messages */
         do { 
             msg = sms_receive(conn);
@@ -2120,6 +2118,7 @@
         } while (msg);
  
         if (sleep > 0) {
+
             /* note that this implementations means that we sleep even
              * when we fail connection.. but time is very short, anyway
              */
@@ -2131,6 +2130,9 @@
             sleep *= 2;
             if (sleep >= 2.0)
                 sleep = 1.999999;
+        }
+        else {
+            sleep = 0.0001;
         }
     }
 }

Reply via email to