Update of /usr/cvsroot/asterisk-addons
In directory mongoose.digium.com:/tmp/cvs-serv9569

Modified Files:
        cdr_addon_mysql.c 
Log Message:
move retry logic to _inside_ the loop (issue #5294)


Index: cdr_addon_mysql.c
===================================================================
RCS file: /usr/cvsroot/asterisk-addons/cdr_addon_mysql.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- cdr_addon_mysql.c   25 Sep 2005 20:41:14 -0000      1.10
+++ cdr_addon_mysql.c   29 Sep 2005 03:42:10 -0000      1.11
@@ -158,13 +158,12 @@
                                default:
                                        ast_log(LOG_ERROR, "cdr_mysql: Unknown 
connection error: (%d) %s\n", mysql_errno(&mysql), mysql_error(&mysql));
                        }
+                       retries--;
+                       if (retries)
+                               goto db_reconnect;
+                       else
+                               ast_log(LOG_ERROR, "cdr_mysql: Retried to 
connect fives times, giving up.\n");
                }
-               retries--;
-               if (retries)
-                       goto db_reconnect;
-               else
-                       ast_log(LOG_ERROR, "cdr_mysql: Retried to connect fives 
times, giving up.\n");
-
        }
 
        /* Maximum space needed would be if all characters needed to be 
escaped, plus a trailing NULL */

_______________________________________________
Asterisk-Cvs mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-cvs

Reply via email to