]> andersk Git - moira.git/blobdiff - server/cache.qc
Used /bin/sh format instead of /bin/csh format, by accident.
[moira.git] / server / cache.qc
index 2a2df3efdf3234769097e528c832267e7855f34c..2c5635ce96df5f8f0347176377a909c6a5145c40 100644 (file)
@@ -15,11 +15,11 @@ static char *rcsid_qsupport_qc = "$Header$";
 
 #include <mit-copyright.h>
 #include "query.h"
-#include "sms_server.h"
+#include "mr_server.h"
 
 
 extern char *whoami, *strsave();
-extern int ingres_errno, sms_errcode;
+extern int ingres_errno, mr_errcode;
 
 
 /*** NOTE **************************************************************
@@ -126,7 +126,7 @@ int *id;
        i->prev = &cachehead;
        cachehead.next->prev = i;
        cachehead.next = i;
-       return(SMS_SUCCESS);
+       return(MR_SUCCESS);
     }
 
     cachemisses++;
@@ -158,17 +158,17 @@ int *id;
 ##     repeat retrieve (j = strings.string_id) where strings.#string=@iname
        break;
     default:
-       return(SMS_INTERNAL);
+       return(MR_INTERNAL);
     }
 ##  inquire_equel(rowcount = "rowcount")
-    if (ingres_errno) return(sms_errcode);
+    if (ingres_errno) return(mr_errcode);
     if (rowcount == 0)
-      return(SMS_NO_MATCH);
+      return(MR_NO_MATCH);
     if (rowcount > 1)
-      return(SMS_NOT_UNIQUE);
+      return(MR_NOT_UNIQUE);
     *id = j;
     if (name[0] == '#' && !strcasecmp(type, "USER"))
-      return(SMS_SUCCESS);
+      return(MR_SUCCESS);
     if (cachesize < CACHESIZE) {
        i = (struct item *) malloc(sizeof(struct item));
        cachesize++;
@@ -185,7 +185,7 @@ int *id;
     i->prev = &cachehead;
     cachehead.next->prev = i;
     cachehead.next = i;
-    return(SMS_SUCCESS);
+    return(MR_SUCCESS);
 ##}
 
 
@@ -215,7 +215,7 @@ char **name;
        i->prev = &cachehead;
        cachehead.next->prev = i;
        cachehead.next = i;
-       return(SMS_SUCCESS);
+       return(MR_SUCCESS);
     }
 
     cachemisses++;
@@ -247,22 +247,22 @@ char **name;
 ##     repeat retrieve (iname = strings.string) where strings.string_id=@j
        break;
     default:
-       return(SMS_INTERNAL);
+       return(MR_INTERNAL);
     }
 ##  inquire_equel(rowcount = "rowcount")
-    if (ingres_errno) return(sms_errcode);
+    if (ingres_errno) return(mr_errcode);
     if (rowcount == 0) {
        free(*name);
        sprintf(iname, "#%d", j);
        *name = strsave(iname);
-       return(SMS_NO_MATCH);
+       return(MR_NO_MATCH);
     }
     if (rowcount != 1)
-      return(SMS_INTERNAL);
+      return(MR_INTERNAL);
     free(*name);
     *name = strsave(strtrim(iname));
     if (**name == '#' && !strcasecmp(type, "USER"))
-      return(SMS_SUCCESS);
+      return(MR_SUCCESS);
     if (cachesize < CACHESIZE) {
        i = (struct item *) malloc(sizeof(struct item));
        cachesize++;
@@ -279,7 +279,7 @@ char **name;
     i->prev = &cachehead;
     cachehead.next->prev = i;
     cachehead.next = i;
-    return(SMS_SUCCESS);
+    return(MR_SUCCESS);
 ##}
 
 
@@ -296,7 +296,7 @@ int id;
 
     for (i = cachehead.next; i != &cachehead; i = i->next)
       if (i->id == id && !strcmp(i->type, type))
-       return(SMS_SUCCESS);
+       return(MR_SUCCESS);
     if (cachesize < CACHESIZE) {
        i = (struct item *) malloc(sizeof(struct item));
        cachesize++;
@@ -313,7 +313,7 @@ int id;
     i->prev = &cachehead;
     cachehead.next->prev = i;
     cachehead.next = i;
-    return(SMS_SUCCESS);
+    return(MR_SUCCESS);
 }
 
 
@@ -334,7 +334,7 @@ char *type;
            i->next->prev = i->prev;
            i->prev->next = i->next;
            free(i);
-           return(SMS_SUCCESS);
+           return(MR_SUCCESS);
        }
     }
 }
This page took 0.048834 seconds and 4 git commands to generate.