X-Git-Url: http://andersk.mit.edu/gitweb/moira.git/blobdiff_plain/6612addc904a6adaa77cf0c3ccbdd978f84cf2d7..e448f08dfc620178994c0fe53e135c874eb54f67:/server/qvalidate.dc diff --git a/server/qvalidate.dc b/server/qvalidate.dc index c3ac6cb8..188d4ffb 100644 --- a/server/qvalidate.dc +++ b/server/qvalidate.dc @@ -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))