## hostaccess.acl_type = "USER"))
if (flag)
return(SMS_IN_USE);
- else
- return(SMS_SUCCESS);
+ if (ingres_errno)
+ return(sms_errcode);
+ return(SMS_SUCCESS);
##}
user = *(int *)argv[0];
## repeat retrieve (type = u.potype, id = u.pop_id)
## where u.users_id = @user
+ if (ingres_errno) return(sms_errcode);
if (!strcmp(strtrim(type), "POP"))
set_pop_usage(id, -1);
return(SMS_IN_USE);
## repeat delete mcmap where mcmap.mach_id = @id
+ if (ingres_errno) return(sms_errcode);
return(SMS_SUCCESS);
##}
## repeat retrieve (flag = any(svc.clu_id where svc.clu_id=@id))
if (flag)
return(SMS_IN_USE);
- else
- return(SMS_SUCCESS);
+ if (ingres_errno)
+ return(sms_errcode);
+ return(SMS_SUCCESS);
##}
if (set_next_object_id("gid", "list"))
return(SMS_INGRES_ERR);
## repeat retrieve (ngid = values.value) where values.name = "gid"
+ if (ingres_errno) return(sms_errcode);
sprintf(argv[idx], "%d", ngid);
} else {
strcpy(argv[idx], "-1");
## zephyr.iui_type = "LIST" and zephyr.iui_id = @id))
if (flag)
return(SMS_IN_USE);
- else
- return(SMS_SUCCESS);
+ if (ingres_errno)
+ return(sms_errcode);
+ return(SMS_SUCCESS);
##}
## repeat retrieve (flag = servers.inprogress) where servers.#name = @name
if (flag)
return(SMS_IN_USE);
- else
- return(SMS_SUCCESS);
+ if (ingres_errno)
+ return(sms_errcode);
+ return(SMS_SUCCESS);
##}
## where serverhosts.service=uppercase(@name) and serverhosts.mach_id=@id
if (flag)
return(SMS_IN_USE);
- else
- return(SMS_SUCCESS);
+ if (ingres_errno)
+ return(sms_errcode);
+ return(SMS_SUCCESS);
##}
status = check_nfs(mach_id, name, access);
fid = *(int *)argv[0];
## replace nfsquota (phys_id = var_phys_id) where nfsquota.filsys_id = fid
+ if (ingres_errno) return(sms_errcode);
return(status);
} else
return(SMS_SUCCESS);
## endretrieve
}
## }
-
+ if (ingres_errno)
+ return(sms_errcode);
return(status);
##}
## repeat delete q where q.filsys_id = @id
## repeat delete fsgroup where fsgroup.filsys_id = @id
## repeat delete fsgroup where fsgroup.group_id = @id
+ if (ingres_errno) return(sms_errcode);
return(SMS_SUCCESS);
##}
## repeat retrieve (exists = any(filesys.label where filesys.phys_id = @id))
if (exists)
return(SMS_IN_USE);
+ if (ingres_errno)
+ return(sms_errcode);
return(SMS_SUCCESS);
##}
## q.filsys_id = @fs
## repeat replace nfsphys (allocated = nfsphys.allocated - @quota)
## where nfsphys.nfsphys_id = filesys.#phys_id and filesys.filsys_id = @fs
+ if (ingres_errno) return(sms_errcode);
return(SMS_SUCCESS);
##}
## replace v (value = id) where v.#name = "strings_id"
## append to strings (string_id = id, string = name)
}
+ if (ingres_errno) return(sms_errcode);
*(int *)argv[1] = id;
- return(0);
+ return(SMS_SUCCESS);
##}
free(argv);
}
sq_destroy(sq);
+ if (ingres_errno) return(sms_errcode);
return(SMS_SUCCESS);
##}
## where nq.filsys_id = @fs and nq.users_id = @user
## repeat replace nfsphys (allocated = nfsphys.allocated + @quota)
## where nfsphys.nfsphys_id = filesys.#phys_id and filesys.filsys_id = @fs
+ if (ingres_errno) return(sms_errcode);
return(SMS_SUCCESS);
##}
## repeat retrieve (id = users.pop_id, potype = users.#potype)
## where users.users_id = @user
+ if (ingres_errno) return(sms_errcode);
if (!strcmp(strtrim(potype), "POP"))
set_pop_usage(id, -1);
set_pobox_modtime(q, argv, cl);
## repeat replace tblstats (updates = tblstats.updates + 1, modtime = "now")
## where tblstats.#table = "users"
+ if (ingres_errno) return(sms_errcode);
return(SMS_SUCCESS);
##}
}
sq_destroy(sq);
+ if (ingres_errno) return(sms_errcode);
## repeat replace tblstats (retrieves = tblstats.retrieves + 1)
## where tblstats.#table = "list"
}
sq_destroy(sq);
+ if (ingres_errno) return(sms_errcode);
if (!found) return(SMS_NO_MATCH);
return(SMS_SUCCESS);
##}
## }
}
+ if (ingres_errno) return(sms_errcode);
if (!found) return(SMS_NO_MATCH);
return(SMS_SUCCESS);
##}
## {
(*action)(2, targv, actarg);
## }
+ if (ingres_errno) return(sms_errcode);
targv[0] = "LIST";
## repeat retrieve (member_name = list.name)
## {
(*action)(2, targv, actarg);
## }
+ if (ingres_errno) return(sms_errcode);
targv[0] = "STRING";
## repeat retrieve (member_name = strings.string)
## {
(*action)(2, targv, actarg);
## }
+ if (ingres_errno) return(sms_errcode);
targv[0] = "KERBEROS";
## repeat retrieve (member_name = strings.string)
## {
(*action)(2, targv, actarg);
## }
+ if (ingres_errno) return(sms_errcode);
return(SMS_SUCCESS);
##}
## repeat retrieve (ct = count(imembers.list_id
## where imembers.list_id = @list and
## imembers.direct = 1))
+ if (ingres_errno) return(sms_errcode);
sprintf(countbuf, "%d", ct);
(*action)(1, rargv, actarg);
return(SMS_SUCCESS);
## retrieve (name = rvar.rfield) where qual {
(*action)(1, rargv, actarg);
## }
+ if (ingres_errno) return(sms_errcode);
## inquire_equel(rowcount = "rowcount")
## repeat replace tblstats (retrieves = tblstats.retrieves + 1)
## where tblstats.#table = @rtbl
## retrieve (sname = sh.service, mname = machine.name) where qual {
(*action)(2, rargv, actarg);
## }
+ if (ingres_errno) return(sms_errcode);
## inquire_equel(rowcount = "rowcount")
## repeat replace tblstats (retrieves = tblstats.retrieves + 1)
## where tblstats.#table = "serverhosts"
## repeat retrieve (mid = sh.mach_id, machname = m.name)
## where sh.service = "POP" and m.mach_id = sh.mach_id and
## sh.value2 - sh.value1 = max(sh.value2-sh.value1 where sh.service="POP")
+ if (ingres_errno) return(sms_errcode);
## inquire_equel(rowcount = "rowcount");
if (rowcount == 0)
return(SMS_NO_POBOX);
## pmodwith=@entity)
## where u.#users_id = @users_id
## inquire_equel(rowcount = "rowcount");
+ if (ingres_errno) return(sms_errcode);
if (rowcount != 1)
return(SMS_INTERNAL);
set_pop_usage(mid, 1);
if (set_next_object_id("list_id", "list"))
return(SMS_NO_ID);
## repeat retrieve (list_id = values.value) where values.name = "list_id"
+ if (ingres_errno) return(sms_errcode);
## inquire_equel(rowcount = "rowcount");
if (rowcount != 1)
return(SMS_INTERNAL);
## acl_type = "USER", acl_id = @users_id, modtime = "now",
## modby = @who, modwith = @entity)
## where values.name = "gid"
+ if (ingres_errno) return(sms_errcode);
## inquire_equel(rowcount = "rowcount");
if (rowcount != 1)
return(SMS_INTERNAL);
incremental_clear_before();
## repeat append imembers (#list_id = @list_id, member_type = "USER",
## member_id = @users_id, ref_count = 1, direct = 1)
+ if (ingres_errno) return(sms_errcode);
## inquire_equel(rowcount = "rowcount");
if (rowcount != 1)
return(SMS_INTERNAL);
m_id = mid;
}
## }
+ if (ingres_errno) return(sms_errcode);
if (maxsize == 0)
return(SMS_NO_FILESYS);
## lockertype = "HOMEDIR", modtime = "now",
## modby = @who, modwith = @entity)
## where values.name = "filsys_id"
+ if (ingres_errno) return(sms_errcode);
## inquire_equel(rowcount = "rowcount");
if (rowcount != 1)
return(SMS_INTERNAL);
/* set quota */
## repeat retrieve (quota = values.value) where values.name = "def_quota"
+ if (ingres_errno) return(sms_errcode);
## inquire_equel(rowcount = "rowcount");
if (rowcount != 1)
return(SMS_NO_QUOTA);
## #quota = @quota, phys_id = @pid, modtime = "now",
## modby = @who, modwith = @entity)
## where values.name = "filsys_id"
+ if (ingres_errno) return(sms_errcode);
## inquire_equel(rowcount = "rowcount");
if (rowcount != 1)
return(SMS_INTERNAL);
## repeat replace nfsphys (allocated = nfsphys.allocated + @quota)
## where nfsphys.nfsphys_id = filesys.#phys_id and
## filesys.filsys_id = values.value and values.name = "filsys_id"
+ if (ingres_errno) return(sms_errcode);
## inquire_equel(rowcount = "rowcount");
if (rowcount != 1)
return(SMS_INTERNAL);
sprintf(buffer, "nq.users_id = %d and nq.filsys_id = values.value and values.name = \"filsys_id\"", users_id);
incremental_after("nfsquota", buffer, argv);
com_err(whoami, 0, "quota of %d assigned", quota);
+ if (ingres_errno) return(sms_errcode);
## repeat replace tblstats (updates = tblstats.updates + 1, modtime = "now")
## where tblstats.table = "users"
## repeat replace tblstats (appends = tblstats.appends + 1, modtime = "now")
## where tblstats.table = "list" or tblstats.table = "filesys" or
## tblstats.table = "nfsquota"
+ if (ingres_errno) return(sms_errcode);
return(SMS_SUCCESS);
##}
## repeat replace sh (value1 = sh.value1 + @n)
## where sh.service = "POP" and sh.#mach_id = @mach_id
+ if (ingres_errno) return(sms_errcode);
return(SMS_SUCCESS);
##}
vo++;
}
+ if (ingres_errno) return(sms_errcode);
return(SMS_SUCCESS);
}