]> andersk Git - moira.git/commitdiff
Removed my setup_aftg, thanks to changes in queries2.c while I was
authorgenoa <genoa>
Sun, 9 Aug 1992 22:05:17 +0000 (22:05 +0000)
committergenoa <genoa>
Sun, 9 Aug 1992 22:05:17 +0000 (22:05 +0000)
working on the SQL port.  May or may not DTRT.  Other minor changes
from previous rev eliminate syntax errors.

server/qsupport.dc

index 89718c0146d8f0fa19772c16a596214db08ba543..a2b17f5e234ab9b5aedd317207e956b5f9ec40b9 100644 (file)
@@ -592,6 +592,7 @@ int setup_alis(q, argv, cl)
     int ngid;
     EXEC SQL END DECLARE SECTION;
     char *malloc();
+    unsigned char *p;
     int idx;
 
     if (!strcmp(q->shortname, "alis"))
@@ -942,26 +943,6 @@ setup_dfil(q, argv, cl)
 }
 
 
-/* setup_aftg: needed only because using the query table would
- * create an invalid SQL statement.  *sigh*  Basically just validates
- * that the first argument has type 'FSGROUP' in table 'filesys'.
- */
-
-setup_aftg(q, argv, cl)
-    struct query  *q;
-    char **argv;
-    client *cl;
-{
-    EXEC SQL SELECT filsys_id INTO :idummy FROM filesys
-      WHERE type='FSGROUP';
-
-    if (sqlca.sqlcode != 0)
-      return(MR_NO_MATCH);    /* Is there a better error code to return? */
-
-    return(MR_SUCCESS);
-}
-
-
 /* setup_dnfp: check to see that the nfs physical partition does not have
  * any filesystems assigned to it before allowing it to be deleted.
  */
@@ -1428,8 +1409,8 @@ followup_guax(q, sq, v, action, actarg, cl)
 #ifdef GDSS
        if (q->vcnt == U_END && strlen(argv[U_SIGNATURE])) {
            login = argv[U_NAME];
-           EXEC SQL REPEATED SELECT sigdate, sigwho FROM users  
-             INTO :timestamp, :who
+           EXEC SQL REPEATED SELECT sigdate, sigwho 
+             INTO :timestamp, :who FROM users
              WHERE login = :login;  /** Use LEFT(...,SIZE(...)) here? **/
            /** What about (INGRES) error handling? **/
            /** Is this guaranteed to be a singleton select? **/
@@ -1502,7 +1483,7 @@ followup_ausr(q, argv, cl)
             name = kname_unparse(si.pname, si.pinst, si.prealm);
             status = name_to_id(name, "STRING", &sigwho);
             if (status == MR_NO_MATCH) {
-                EXEC SQL REPEATED SELECT value INTO sigwho FROM numvalues
+                EXEC SQL REPEATED SELECT value INTO :sigwho FROM numvalues
                  WHERE name='strings_id';
                 sigwho++;
                 EXEC SQL REPEATED UPDATE numvalues SET value = :sigwho
@@ -1592,7 +1573,7 @@ followup_uuac(q, argv, cl)
             name = kname_unparse(si.pname, si.pinst, si.prealm);
             status = name_to_id(name, "STRING", &sigwho);
             if (status == MR_NO_MATCH) {
-                EXEC SQL REPEATED SELECT value INTO sigwho FROM numvalues
+                EXEC SQL REPEATED SELECT value INTO :sigwho FROM numvalues
                  WHERE name='strings_id';
                 sigwho++;
                 EXEC SQL REPEATED UPDATE numvalues SET value = :sigwho
@@ -1614,7 +1595,7 @@ followup_uuac(q, argv, cl)
     /* create finger entry, pobox & set modtime on user */
 
 #ifdef GDSS
-    EXEC SQL REPEATED UPDATE users SET modtime='now', modby = :who, modwith = :entity
+    EXEC SQL REPEATED UPDATE users SET modtime='now', modby = :who, modwith = :entity,
         signature = :rawsig, sigdate = :timestamp, sigwho = :sigwho
       WHERE users_id = :id;
 #else /* GDSS */
@@ -2976,7 +2957,7 @@ gmol_internal(q, argv, cl, action, actarg, flag)
       SELECT strings.string FROM strings, imembers
        WHERE imembers.list_id = :list_id AND imembers.member_type='KERBEROS'
          AND imembers.member_id = strings.string_id 
-         AND imembers.direct > :direct;
+         AND imembers.direct > :direct
        ORDER BY 1;
     EXEC SQL OPEN csr122;
     while(1) {
@@ -3938,7 +3919,7 @@ prefetch_value(q,argv,cl)
     if(sqlca.sqlerrd[2] != 1) return(MR_INTERNAL);
 
     argc = q->argc + q->vcnt;   /* end of Argv for APPENDs */
-    sprintf(argv[argc],"%d",value);
+    sprintf(argv[argc],"%d",value);  /** Could save this step by changing tlist from %s to %d **/
 
     return(MR_SUCCESS);
 }
This page took 0.405346 seconds and 5 git commands to generate.