Revision: 77432
          http://sourceforge.net/p/brlcad/code/77432
Author:   brlcad
Date:     2020-10-14 17:31:05 +0000 (Wed, 14 Oct 2020)
Log Message:
-----------
reduce retries to 100.  still need to fix potential 0-alloc.

Modified Paths:
--------------
    brlcad/trunk/src/mged/attach.c

Modified: brlcad/trunk/src/mged/attach.c
===================================================================
--- brlcad/trunk/src/mged/attach.c      2020-10-14 17:21:24 UTC (rev 77431)
+++ brlcad/trunk/src/mged/attach.c      2020-10-14 17:31:05 UTC (rev 77432)
@@ -494,18 +494,22 @@
 }
 
 
+#define MAX_ATTACH_RETRIES 100
+
 void
 get_attached(void)
 {
-    int inflimit = 1000;
+    char **dms;
+    int inflimit = MAX_ATTACH_RETRIES;
+    int nargc;
     int ret;
+    struct bu_vls dm_types = BU_VLS_INIT_ZERO;
     struct bu_vls type = BU_VLS_INIT_ZERO;
+    struct bu_vls type_msg = BU_VLS_INIT_ZERO;
 
-    struct bu_vls type_msg = BU_VLS_INIT_ZERO;
-    struct bu_vls dm_types = BU_VLS_INIT_ZERO;
     dm_list_types(&dm_types, " ");
-    char **dms = (char **)bu_calloc(bu_vls_strlen(&dm_types), sizeof(char *), 
"dm name array");
-    int nargc = bu_argv_from_string(dms, bu_vls_strlen(&dm_types), 
bu_vls_addr(&dm_types));
+    dms = (char **)bu_calloc(bu_vls_strlen(&dm_types), sizeof(char *), "dm 
name array");
+    nargc = bu_argv_from_string(dms, bu_vls_strlen(&dm_types), 
bu_vls_addr(&dm_types));
 
     bu_vls_sprintf(&type_msg, "attach (nu");
     for (int i = 0; i < nargc; i++) {

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to