]> andersk Git - moira.git/blobdiff - server/qvalidate.dc
Added support for optional debugging malloc. No code changes if you are
[moira.git] / server / qvalidate.dc
index c3ac6cb8c45f893ba08a1e0f4f218b2418a247d3..188d4ffb88a36748698e69cb5960b9e71795dcce 100644 (file)
@@ -31,6 +31,12 @@ EXEC SQL END DECLARE SECTION;
 
 EXEC SQL WHENEVER SQLERROR CALL ingerr;
 
+#ifdef _DEBUG_MALLOC_INC
+#undef index
+#define dbg_index(str1,c)             DBindex(__FILE__, __LINE__, str1, c)
+#else
+#define dbg_index index
+#endif
 
 /* Validation Routines */
 
@@ -396,7 +402,6 @@ validate_typedata(q, argv, vo)
     int id;
     EXEC SQL END DECLARE SECTION;
     int status;
-    char *index();
     register char *c;
 
     /* get named object */
@@ -412,11 +417,11 @@ validate_typedata(q, argv, vo)
     if (sqlca.sqlerrd[2] != 1) return(MR_TYPE);
 
     /* now retrieve the record id corresponding to the named object */
-    if (index(data_type, ' '))
-       *index(data_type, ' ') = 0;
+    if (dbg_index(data_type, ' '))
+       *dbg_index(data_type, ' ') = 0;
     if (!strcmp(data_type, "user")) {
        /* USER */
-       if (index(name, '@'))
+       if (dbg_index(name, '@'))
          return(MR_USER);
        status = name_to_id(name, data_type, &id);
        if (status && (status == MR_NO_MATCH || status == MR_NOT_UNIQUE))
This page took 0.032441 seconds and 4 git commands to generate.