[1826] in Moira Commits

home help back first fref pref prev next nref lref last post

/svn/moira r3973 - trunk/moira/incremental/afs

daemon@ATHENA.MIT.EDU (Garry Zacheiss)
Tue Feb 2 14:15:51 2010

Date: Tue, 2 Feb 2010 14:15:44 -0500
From: Garry Zacheiss <zacheiss@MIT.EDU>
Message-Id: <201002021915.o12JFini029867@drugstore.mit.edu>
To: moira-commits@mit.edu
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: zacheiss
Date: 2010-02-02 14:15:44 -0500 (Tue, 02 Feb 2010)
New Revision: 3973

Modified:
   trunk/moira/incremental/afs/afs.c
Log:
int and pointer to int: not the same thing.

Modified: trunk/moira/incremental/afs/afs.c
===================================================================
--- trunk/moira/incremental/afs/afs.c	2010-02-01 21:29:13 UTC (rev 3972)
+++ trunk/moira/incremental/afs/afs.c	2010-02-02 19:15:44 UTC (rev 3973)
@@ -58,21 +58,21 @@
 int add_list_members(int ac, char **av, void  *group);
 int check_user(int ac, char **av, void *ustate);
 void edit_group(int op, char *group, char *type, char *member);
-long pr_try();
+int pr_try();
 void check_afs(void);
 int moira_connect(void);
 int moira_disconnect(void);
 
 /* libprot.a routines */
-extern long pr_Initialize();
-extern long pr_CreateUser();
-extern long pr_CreateGroup();
-extern long pr_DeleteByID();
-extern long pr_ChangeEntry();
-extern long pr_SetFieldsEntry();
-extern long pr_AddToGroup();
-extern long pr_RemoveUserFromGroup();
-extern long pr_SIdToName();
+extern int pr_Initialize();
+extern int pr_CreateUser();
+extern int pr_CreateGroup();
+extern int pr_DeleteByID();
+extern int pr_ChangeEntry();
+extern int pr_SetFieldsEntry();
+extern int pr_AddToGroup();
+extern int pr_RemoveUserFromGroup();
+extern int pr_SIdToName();
 
 static char tbl_buf[1024];
 static struct member {
@@ -175,7 +175,7 @@
       com_err(whoami, 0, "Changing user %s (uid %d) to %s (uid %d)",
 	      before[U_NAME], buid, after[U_NAME], auid);
 
-      code = pr_try(pr_ChangeEntry, before[U_NAME], after[U_NAME], auid, "");
+      code = pr_try(pr_ChangeEntry, before[U_NAME], after[U_NAME], &auid, "");
       if (code)
 	{
 	  critical_alert(whoami, "incremental",
@@ -255,7 +255,7 @@
 {
   int agid, bgid;
   int ahide, bhide;
-  long code, id;
+  int code, id;
   char g1[PR_MAXNAMELEN], g2[PR_MAXNAMELEN];
   char *av[2];
 
@@ -283,11 +283,12 @@
 	  strcpy(g2, "system:");
 	  strcat(g1, before[L_NAME]);
 	  strcat(g2, after[L_NAME]);
+	  id = -agid;
 
 	  com_err(whoami, 0, "Changing group %s (gid %d) to %s (gid %d)",
 		  before[L_NAME], bgid, after[L_NAME], agid);
 
-	  code = pr_try(pr_ChangeEntry, g1, g2, -agid, "");
+	  code = pr_try(pr_ChangeEntry, g1, g2, &id, "");
 	  if (code)
 	    {
 	      critical_alert(whoami, "incremental", "Couldn't change group %s (id %d) "
@@ -661,11 +662,11 @@
 }
 
 
-long pr_try(long (*fn)(), char *a1, char *a2, char *a3, char *a4, char *a5,
+int pr_try(int (*fn)(), char *a1, char *a2, char *a3, char *a4, char *a5,
 	    char *a6, char *a7, char *a8)
 {
   static int initd = 0;
-  long code;
+  int code;
   int tries = 0;
 
   check_afs();
@@ -736,7 +737,7 @@
 
 int moira_connect(void)
 {
-  long code;
+  int code;
 
   if (!mr_connections++)
     {


home help back first fref pref prev next nref lref last post