qfollow.c
CODE= startmoira.c mr_main.c mr_sauth.c mr_scall.c \
mr_srvdata.c mr_shutdown.c mr_util.c \
- mr_server.h query.h qrtn.h qrtn.dc \
- qsupport.dc qsubs.c queries2.c increment.dc \
- cache.dc mr_glue.c qvalidate.dc Imakefile \
- qaccess.dc qsetup.dc qfollow.dc
+ mr_server.h query.h qrtn.h qrtn.pc \
+ qsupport.pc qsubs.c queries2.c increment.pc \
+ cache.pc mr_glue.c qvalidate.pc Imakefile \
+ qaccess.pc qsetup.pc qfollow.pc
SRVOBJ=mr_main.o mr_sauth.o mr_scall.o mr_srvdata.o mr_shutdown.o \
mr_util.o qrtn.o queries2.o qsupport.o qsubs.o \
increment.o cache.o qvalidate.o \
.././gdb/libmrgdb.a -lcom_err -lkrb -ldes -lhesiod,\
${PROGDIR})
library_obj_rule()
-install_library_target(mrglue,$(GLUOBJS),$(SRCS),)
+install_library_target(mrglue,$(GLUOBJS),$(SRCS))
sqlfile(cache)
sqlfile(increment)
h = hashname(name, type);
- /* first clear it out of the transaction chain */
- for (i = &cachehead; i && i->trans; i = i->trans) {
- if (!strcmp(name, i->trans->name) && type==i->trans->type) {
- i->trans = i->trans->trans;
- }
- }
-
- /* now remove it */
for (i = cachehead.next; i != &cachehead; i = i->next) {
if (!strcmp(name, i->name) && type==i->type) {
cachesize--;
hints.hint = callarg;
next_incremental();
return mr_process_query(&pseudo_client, name, argc,
- mr_copy_args(argv, argc), callback, &hints);
+ mr_copy_args(argv, argc), callback,
+ (char *)&hints);
}
hints.hint = callarg;
next_incremental();
return mr_process_query(&pseudo_client, argv[0], argc-1,
- mr_copy_args(argv+1, argc-1), callback, &hints);
+ mr_copy_args(argv+1, argc-1), callback,
+ (char *)&hints);
}
int mr_access_internal(argc, argv)
#include <sys/file.h>
#include <fcntl.h>
#include <string.h>
+#include <arpa/inet.h>
#include <krb.h>
#include <errno.h>
#include "mr_server.h"
char buf1[30];
int i;
extern client **clients;
- extern char *inet_ntoa();
char *cp;
char *ctime();
/* prototypes from libmoira */
struct save_queue *sq_create(void);
-void sq_save_data(struct save_queue *sq, void *data);
-void sq_save_unique_data(struct save_queue *sq, void *data);
-void sq_save_args(int argc, void *argv[], struct save_queue *sq);
+int sq_save_data(struct save_queue *sq, void *data);
+int sq_save_unique_data(struct save_queue *sq, void *data);
+int sq_save_args(int argc, void *argv[], struct save_queue *sq);
int sq_get_data(struct save_queue *sq, void *data);
int sq_remove_data(struct save_queue *sq, void *data);
int sq_empty(struct save_queue *sq);
#include <mit-copyright.h>
#include "mr_server.h"
-
+#include <com_err.h>
#include <ctype.h>
#include <sys/types.h>
#include <string.h>
char *fmt;
caddr_t pvar;
{
- extern char *error_message();
extern client *cur_client;
if (whoami) {
int i;
i = atoi(argv[0]);
log_flags = i;
-#ifsql INGRES
+#ifdef INGRES
if (i & LOG_SQL) {
EXEC SQL set printqry;
} else {
EXEC SQL set noprintqry;
}
-#endsql
+#endif
return(MR_SUCCESS);
}
if (q->rvar) {
if (v && v->post_rtn) {
sq = sq_create();
- status = do_retrieve(q, pqual, psort, sq_save_args, sq);
+ status = do_retrieve(q, pqual, psort, sq_save_args,
+ (char *)sq);
if (status != MR_SUCCESS) {
sq_destroy(sq);
break;
strcat(stmt_buf,psort);
}
- return do_for_all_rows(stmt_buf, q->vcnt, action, actarg);
+ return do_for_all_rows(stmt_buf, q->vcnt, action, (int)actarg);
}
char *sqlstrstr(str, pat)
void list_queries(version, action, actarg)
int version;
int (*action)();
- int actarg;
+ char *actarg;
{
register struct query *q;
register int i;
void help_query(q, action, actarg)
register struct query *q;
int (*action)();
- int actarg;
+ char *actarg;
{
register int argcount;
register int i;
{
EXEC SQL FETCH csr102 INTO :id;
if(sqlca.sqlcode!=0) break;
- sq_save_data(sq, id);
+ sq_save_data(sq, (char *)id);
rowcount++;
}
EXEC SQL CLOSE csr102;
sq = sq_create();
if (!strcmp(atype, "RLIST")) {
- sq_save_data(sq, aid);
+ sq_save_data(sq, (char *)aid);
/* get all the list_id's of containing lists */
EXEC SQL DECLARE csr107 CURSOR FOR
SELECT list_id FROM imembers
while(1) {
EXEC SQL FETCH csr107 INTO :listid;
if(sqlca.sqlcode != 0) break;
- sq_save_unique_data(sq, listid);
+ sq_save_unique_data(sq, (char *)listid);
}
EXEC SQL CLOSE csr107;
/* now process each one */
while(1) {
EXEC SQL FETCH csr108 INTO :listid;
if(sqlca.sqlcode != 0) break;
- sq_save_data(sq, listid);
+ sq_save_data(sq, (char *)listid);
}
EXEC SQL CLOSE csr108;
/* now process each one */
while(1) {
EXEC SQL FETCH csr109 INTO :listid;
if(sqlca.sqlcode != 0) break;
- sq_save_data(sq, listid);
+ sq_save_data(sq, (char*)listid);
}
EXEC SQL CLOSE csr109;
/* now process each one */
if (sqlca.sqlcode != 0) break;
if (members++ > 49)
break;
- sq_save_data(sq, ((int)member_type[0] << 24) | (member_id & 0xffffff));
+ sq_save_data(sq, (char *)(((int)member_type[0] << 24) |
+ (member_id & 0xffffff)));
}
EXEC SQL CLOSE csr118;
int set_next_object_id(char *objectx, enum tables table, int limit);
/* prototypes from qsubs.c */
-void list_queries(int version, int (*action)(), int actarg);
-void help_query(struct query *q, int (*action)(), int actarg);
+void list_queries(int version, int (*action)(), char *actarg);
+void help_query(struct query *q, int (*action)(), char *actarg);
struct query *get_query_by_name(char *name, int version);
int readlock_table(struct valobj *vo);
int convert_wildcards_uppercase(char *arg);
+extern SQLDA *sqlald(int,int,int);
+
EXEC SQL WHENEVER SQLERROR DO dbmserr();
/* Validation Routines */
#endif lint
#include <mit-copyright.h>
+#include <errno.h>
#include <stdio.h>
-#include <strings.h>
+#include <string.h>
#include <sys/types.h>
#include <sys/file.h>
#include <sys/wait.h>
#include <sys/signal.h>
#include <sys/ioctl.h>
+#include <time.h>
#include <fcntl.h>
#include <sys/resource.h>
#include <moira_site.h>
extern int errno;
char *whoami;
-cleanup()
+void cleanup()
{
int stat, serrno = errno;
char buf[BUFSIZ];
do {
char *time_s;
- extern char *ctime();
long foo;
done = 0;