s/cmds/rcpt_cmds/ to avoid conflict with Linux Redhat "prandom".

This commit is contained in:
Kurt Zeilenga 2000-05-09 17:25:59 +00:00
parent dcc943e528
commit d25f52be38
3 changed files with 9 additions and 9 deletions

View File

@ -12,7 +12,7 @@
#include <ac/stdlib.h> #include <ac/stdlib.h>
#include "rcpt500.h" #include "rcpt500.h"
struct command cmds[] = { struct command rcpt_cmds[] = {
"help", help_cmd, /* help must be the first command */ "help", help_cmd, /* help must be the first command */
"query for", query_cmd, /* must come before "query for" */ "query for", query_cmd, /* must come before "query for" */
"query", query_cmd, "query", query_cmd,

View File

@ -141,7 +141,7 @@ main( int argc, char **argv )
if ( dosyslog ) { if ( dosyslog ) {
syslog( LOG_INFO, "processing command \"%s %s\" from %s", syslog( LOG_INFO, "processing command \"%s %s\" from %s",
( msg.msg_command < 0 ) ? "Unknown" : ( msg.msg_command < 0 ) ? "Unknown" :
cmds[ msg.msg_command ].cmd_text, rcpt_cmds[ msg.msg_command ].cmd_text,
( msg.msg_arg == NULL ) ? "" : msg.msg_arg, msg.msg_replyto ); ( msg.msg_arg == NULL ) ? "" : msg.msg_arg, msg.msg_replyto );
} }
@ -151,10 +151,10 @@ main( int argc, char **argv )
/* /*
sprintf( reply, "Your request was interpreted as: %s %s\n\n", sprintf( reply, "Your request was interpreted as: %s %s\n\n",
cmds[ msg.msg_command ].cmd_text, msg.msg_arg ); rcpt_cmds[ msg.msg_command ].cmd_text, msg.msg_arg );
*/ */
(*cmds[ msg.msg_command ].cmd_handler)( &msg, reply ); (*rcpt_cmds[ msg.msg_command ].cmd_handler)( &msg, reply );
if ( send_reply( &msg, reply ) < 0 ) { if ( send_reply( &msg, reply ) < 0 ) {
if ( dosyslog ) { if ( dosyslog ) {
@ -360,10 +360,10 @@ find_command( char *text, char **argp )
} }
*s = '\0'; *s = '\0';
for ( i = 0; cmds[ i ].cmd_text != NULL; ++i ) { for ( i = 0; rcpt_cmds[ i ].cmd_text != NULL; ++i ) {
if (( s = strstr( argbuf, cmds[ i ].cmd_text )) != NULL if (( s = strstr( argbuf, rcpt_cmds[ i ].cmd_text )) != NULL
&& isspace( (unsigned char) s[ strlen( cmds[ i ].cmd_text ) ] )) { && isspace( (unsigned char) s[ strlen( rcpt_cmds[ i ].cmd_text ) ] )) {
strcpy( argbuf, text + (s - argbuf) + strlen( cmds[ i ].cmd_text )); strcpy( argbuf, text + (s - argbuf) + strlen( rcpt_cmds[ i ].cmd_text ));
*argp = argbuf; *argp = argbuf;
while ( isspace( (unsigned char) **argp )) { while ( isspace( (unsigned char) **argp )) {
++(*argp); ++(*argp);

View File

@ -41,7 +41,7 @@ int query_cmd LDAP_P((struct msginfo *msgp, char *reply));
*/ */
/* cmds.c */ /* cmds.c */
extern struct command cmds[]; extern struct command rcpt_cmds[];
/* main.c */ /* main.c */
extern int dosyslog; extern int dosyslog;
#ifdef LDAP_CONNECTIONLESS #ifdef LDAP_CONNECTIONLESS