]> andersk Git - moira.git/blobdiff - server/qsetup.pc
Rename query type enums so they're less likely to collide with random
[moira.git] / server / qsetup.pc
index 2b4befd3ee63410918e320cd60a658d7c482bf43..8c52a8c0364cc2709ebf4d0c873f4b558f8d7ab6 100644 (file)
@@ -119,7 +119,7 @@ int setup_ausr(struct query *q, char *argv[], client *cl)
   if ((mr_errcode = prefetch_value(q, argv, cl)) != MR_SUCCESS)
     return mr_errcode;
 
-  /* If this is an UPDATE query, we're done. */
+  /* If this is an MR_Q_UPDATE query, we're done. */
   if (row == 2)
     return MR_SUCCESS;
 
@@ -283,7 +283,7 @@ int setup_asnt(struct query *q, char *argv[], client *cl)
   char *account_number;
 
   /* Check for asnt or usnt. */
-  if (q->type == APPEND)
+  if (q->type == MR_Q_APPEND)
     row = 0;
   else
     row = 1;
@@ -1001,7 +1001,7 @@ int setup_dqot(struct query *q, char **argv, client *cl)
  * from within a setup_...() routine with the appropriate arguments.
  *
  * Correct functioning of this routine may depend on the assumption
- * that this query is an APPEND.
+ * that this query is an MR_Q_APPEND.
  */
 
 int prefetch_value(struct query *q, char **argv, client *cl)
@@ -1027,7 +1027,7 @@ int prefetch_value(struct query *q, char **argv, client *cl)
   if (sqlca.sqlerrd[2] != 1)
     return MR_INTERNAL;
 
-  argc = q->argc + q->vcnt;   /* end of Argv for APPENDs */
+  argc = q->argc + q->vcnt;   /* end of Argv for MR_Q_APPENDs */
   sprintf(argv[argc], "%d", value);
 
   return MR_SUCCESS;
@@ -1340,7 +1340,7 @@ int setup_aprn(struct query *q, char **argv, client *cl)
   EXEC SQL END DECLARE SECTION;
 
   /* Check for aprn or uprn. */
-  if (q->type == APPEND)
+  if (q->type == MR_Q_APPEND)
     row = 0;
   else
     row = 1;
@@ -1353,7 +1353,7 @@ int setup_aprn(struct query *q, char **argv, client *cl)
     return MR_BAD_CHAR;
   else
     {
-      if (q->type == APPEND)
+      if (q->type == MR_Q_APPEND)
        {
          EXEC SQL SELECT COUNT(name) INTO :count FROM printers
            WHERE name = :name OR duplexname = :name;
@@ -1372,7 +1372,7 @@ int setup_aprn(struct query *q, char **argv, client *cl)
 
   if (*duplexname)
     {
-      if (q->type == APPEND)
+      if (q->type == MR_Q_APPEND)
        {
          EXEC SQL SELECT COUNT(name) INTO :count FROM printers
            WHERE name = :duplexname OR duplexname = :duplexname;
This page took 0.045782 seconds and 4 git commands to generate.