* $Header$
*
* Copyright (C) 1987 by the Massachusetts Institute of Technology
- *
- * $Log$
- * Revision 1.2 1987-06-16 17:48:58 wesommer
- * Clean up memory allocation, indenting.
- *
- * Revision 1.1 87/06/04 01:29:32 wesommer
- * Initial revision
+ * For copying and distribution information, please see the file
+ * <mit-copyright.h>.
*
*/
static char *rcsid_sms_query_c = "$Header$";
#endif lint
+#include <mit-copyright.h>
#include "sms_private.h"
/*
* It builds a new argument vector with the query handle prepended,
* and calls sms_query_internal.
*/
+int level = 0;
int sms_query(name, argc, argv, callproc, callarg)
char *name; /* Query name */
register sms_params *params = NULL;
sms_params *reply = NULL;
int stopcallbacks = 0;
+
+ if (level) return SMS_QUERY_NOT_REENTRANT;
CHECK_CONNECTED;
+ level++;
- params = ¶ms_st;
+ params = ¶ms_st;
+ params->sms_version_no = sending_version_no;
params->sms_procno = SMS_QUERY;
params->sms_argc = argc;
params->sms_argl = NULL;
complete_operation(_sms_recv_op);
if (OP_STATUS(_sms_recv_op) != OP_COMPLETE) {
sms_disconnect();
- return SMS_ABORTED;
+ status = SMS_ABORTED;
+ goto punt_1;
}
}
punt:
sms_destroy_reply(reply);
-
+punt_1:
+ level--;
return status;
}
/*