]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#526: s/cmds/rcpt_cmds/ to avoid conflict with Redhat Linux "prandom"
authorKurt Zeilenga <kurt@openldap.org>
Tue, 9 May 2000 17:27:23 +0000 (17:27 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 9 May 2000 17:27:23 +0000 (17:27 +0000)
CHANGES
clients/rcpt500/cmds.c
clients/rcpt500/main.c
clients/rcpt500/rcpt500.h

diff --git a/CHANGES b/CHANGES
index 974c7762d826bc5912e2511422eaa8e404fedb42..3e7a6cd0698d06cee85c224956c54494703e6ad2 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -10,6 +10,7 @@ Changes included in OpenLDAP 1.2.11 Release Engineering
        Fixed NULL prefix bug in libldap/ufn.c
        Fixed slapd_shutdown extern reference bug (ITS#527)
        Build Environment
+               Changed RCPT cmds symbol to avoid link conflict (ITS#526)
                Changed LDBM directory to $localstatedir/openldap-ldbm
 
 Changes included in OpenLDAP 1.2.10
index fe893095677d35937a3e0f4473e65f9160a5c51f..258b7d74caf47c4f63a72b80a63a272e29aa5ae5 100644 (file)
@@ -6,10 +6,12 @@
  * All Rights Reserved
  */
 
-#include <stdio.h>
+#include "portable.h"
+
+#include <stdlib.h>
 #include "rcpt500.h"
 
-struct command cmds[] = {
+struct command rcpt_cmds[] = {
        "help",         help_cmd,       /* help must be the first command */
        "query for",    query_cmd,      /* must come before "query for" */
        "query",        query_cmd,
index 449c1b8a5ac252ae0066a6898c65b6d714632f5c..e215d50d4a2691055680ad5e7c99915bf311f963 100644 (file)
@@ -140,7 +140,7 @@ main( int argc, char **argv )
     if ( dosyslog ) {
        syslog( LOG_INFO, "processing command \"%s %s\" from %s",
                ( 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 );
     }
 
@@ -150,10 +150,10 @@ main( int argc, char **argv )
 
 /*
     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 ( dosyslog ) {
@@ -359,10 +359,10 @@ find_command( char *text, char **argp )
     }
     *s = '\0';
 
-    for ( i = 0; cmds[ i ].cmd_text != NULL; ++i ) {
-       if (( s = strstr( argbuf, cmds[ i ].cmd_text )) != NULL
-           && isspace( (unsigned char) s[ strlen( cmds[ i ].cmd_text ) ] )) {
-           strcpy( argbuf, text + (s - argbuf) + strlen( cmds[ i ].cmd_text ));
+    for ( i = 0; rcpt_cmds[ i ].cmd_text != NULL; ++i ) {
+       if (( s = strstr( argbuf, rcpt_cmds[ i ].cmd_text )) != NULL
+           && isspace( (unsigned char) s[ strlen( rcpt_cmds[ i ].cmd_text ) ] )) {
+           strcpy( argbuf, text + (s - argbuf) + strlen( rcpt_cmds[ i ].cmd_text ));
            *argp = argbuf;
            while ( isspace( (unsigned char) **argp )) {
                ++(*argp);
index c8d4da822d0f80bd13604a06f6a6a95780e2aff5..ec23a1d1eadb42d27982cb8bfb42e16ac4a9cd74 100644 (file)
@@ -40,7 +40,7 @@ int   query_cmd LDAP_P((struct msginfo *msgp, char *reply));
  */
 
 /* cmds.c */
-extern struct command cmds[];
+extern struct command rcpt_cmds[];
 /* main.c */
 extern int dosyslog;
 #ifdef LDAP_CONNECTIONLESS