Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Shawn McKinney
OpenLDAP
Commits
4e656785
Commit
4e656785
authored
May 09, 2000
by
Kurt Zeilenga
Browse files
ITS#526: s/cmds/rcpt_cmds/ to avoid conflict with Redhat Linux "prandom"
parent
35504eb7
Changes
4
Hide whitespace changes
Inline
Side-by-side
CHANGES
View file @
4e656785
...
...
@@ -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
...
...
clients/rcpt500/cmds.c
View file @
4e656785
...
...
@@ -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
,
...
...
clients/rcpt500/main.c
View file @
4e656785
...
...
@@ -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
);
...
...
clients/rcpt500/rcpt500.h
View file @
4e656785
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment