mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-23 16:19:35 -05:00
fixed exit()'s to be return()'s
This commit is contained in:
parent
8a2839b672
commit
86e1568752
1 changed files with 21 additions and 17 deletions
|
|
@ -7,6 +7,10 @@
|
||||||
* as authorized by the OpenLDAP Public License. A copy of this
|
* as authorized by the OpenLDAP Public License. A copy of this
|
||||||
* license is available at http://www.OpenLDAP.org/license.html or
|
* license is available at http://www.OpenLDAP.org/license.html or
|
||||||
* in file LICENSE in the top-level directory of the distribution.
|
* in file LICENSE in the top-level directory of the distribution.
|
||||||
|
*
|
||||||
|
* $Id$
|
||||||
|
*
|
||||||
|
* $Log$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "portable.h"
|
#include "portable.h"
|
||||||
|
|
@ -32,7 +36,7 @@ int tcl_back_db_config (
|
||||||
if (ti == NULL) {
|
if (ti == NULL) {
|
||||||
fprintf (stderr, "%s: line %d: tcl backend info is null!\n", fname,
|
fprintf (stderr, "%s: line %d: tcl backend info is null!\n", fname,
|
||||||
lineno);
|
lineno);
|
||||||
exit (1);
|
return( 1 );
|
||||||
}
|
}
|
||||||
if (ti->ti_ii == NULL) {
|
if (ti->ti_ii == NULL) {
|
||||||
ti->ti_ii = global_i;
|
ti->ti_ii = global_i;
|
||||||
|
|
@ -44,7 +48,7 @@ int tcl_back_db_config (
|
||||||
Debug (LDAP_DEBUG_ANY,
|
Debug (LDAP_DEBUG_ANY,
|
||||||
"%s: line %d: missing script in \"scriptpath <script>\" line\n",
|
"%s: line %d: missing script in \"scriptpath <script>\" line\n",
|
||||||
fname, lineno, 0);
|
fname, lineno, 0);
|
||||||
exit (1);
|
return( 1 );
|
||||||
}
|
}
|
||||||
ti->script_path = (char *) strdup (argv[1]);
|
ti->script_path = (char *) strdup (argv[1]);
|
||||||
|
|
||||||
|
|
@ -56,7 +60,7 @@ int tcl_back_db_config (
|
||||||
Debug (LDAP_DEBUG_ANY,
|
Debug (LDAP_DEBUG_ANY,
|
||||||
"%s: line %d: missing script in \"tclrealm <name>\" line\n",
|
"%s: line %d: missing script in \"tclrealm <name>\" line\n",
|
||||||
fname, lineno, 0);
|
fname, lineno, 0);
|
||||||
exit (1);
|
return( 1 );
|
||||||
}
|
}
|
||||||
ti->ti_ii = NULL;
|
ti->ti_ii = NULL;
|
||||||
|
|
||||||
|
|
@ -85,7 +89,7 @@ int tcl_back_db_config (
|
||||||
Debug (LDAP_DEBUG_ANY,
|
Debug (LDAP_DEBUG_ANY,
|
||||||
"%s: line %d: missing proc in \"bind <proc>\" line\n",
|
"%s: line %d: missing proc in \"bind <proc>\" line\n",
|
||||||
fname, lineno, 0);
|
fname, lineno, 0);
|
||||||
exit (1);
|
return( 1 );
|
||||||
}
|
}
|
||||||
ti->ti_bind = (char *) strdup (argv[1]);
|
ti->ti_bind = (char *) strdup (argv[1]);
|
||||||
|
|
||||||
|
|
@ -95,7 +99,7 @@ int tcl_back_db_config (
|
||||||
Debug (LDAP_DEBUG_ANY,
|
Debug (LDAP_DEBUG_ANY,
|
||||||
"%s: line %d: missing proc in \"unbind <proc>\" line\n",
|
"%s: line %d: missing proc in \"unbind <proc>\" line\n",
|
||||||
fname, lineno, 0);
|
fname, lineno, 0);
|
||||||
exit (1);
|
return( 1 );
|
||||||
}
|
}
|
||||||
ti->ti_unbind = (char *) strdup (argv[1]);
|
ti->ti_unbind = (char *) strdup (argv[1]);
|
||||||
|
|
||||||
|
|
@ -105,7 +109,7 @@ int tcl_back_db_config (
|
||||||
Debug (LDAP_DEBUG_ANY,
|
Debug (LDAP_DEBUG_ANY,
|
||||||
"%s: line %d: missing proc in \"search <proc>\" line\n",
|
"%s: line %d: missing proc in \"search <proc>\" line\n",
|
||||||
fname, lineno, 0);
|
fname, lineno, 0);
|
||||||
exit (1);
|
return( 1 );
|
||||||
}
|
}
|
||||||
ti->ti_search = (char *) strdup (argv[1]);
|
ti->ti_search = (char *) strdup (argv[1]);
|
||||||
|
|
||||||
|
|
@ -115,7 +119,7 @@ int tcl_back_db_config (
|
||||||
Debug (LDAP_DEBUG_ANY,
|
Debug (LDAP_DEBUG_ANY,
|
||||||
"%s: line %d: missing proc in \"compare <proc>\" line\n",
|
"%s: line %d: missing proc in \"compare <proc>\" line\n",
|
||||||
fname, lineno, 0);
|
fname, lineno, 0);
|
||||||
exit (1);
|
return( 1 );
|
||||||
}
|
}
|
||||||
ti->ti_compare = (char *) strdup (argv[1]);
|
ti->ti_compare = (char *) strdup (argv[1]);
|
||||||
|
|
||||||
|
|
@ -125,7 +129,7 @@ int tcl_back_db_config (
|
||||||
Debug (LDAP_DEBUG_ANY,
|
Debug (LDAP_DEBUG_ANY,
|
||||||
"%s: line %d: missing proc in \"modify <proc>\" line\n",
|
"%s: line %d: missing proc in \"modify <proc>\" line\n",
|
||||||
fname, lineno, 0);
|
fname, lineno, 0);
|
||||||
exit (1);
|
return( 1 );
|
||||||
}
|
}
|
||||||
ti->ti_modify = (char *) strdup (argv[1]);
|
ti->ti_modify = (char *) strdup (argv[1]);
|
||||||
|
|
||||||
|
|
@ -135,7 +139,7 @@ int tcl_back_db_config (
|
||||||
Debug (LDAP_DEBUG_ANY,
|
Debug (LDAP_DEBUG_ANY,
|
||||||
"%s: line %d: missing proc in \"modrdn <proc>\" line\n",
|
"%s: line %d: missing proc in \"modrdn <proc>\" line\n",
|
||||||
fname, lineno, 0);
|
fname, lineno, 0);
|
||||||
exit (1);
|
return( 1 );
|
||||||
}
|
}
|
||||||
ti->ti_modrdn = (char *) strdup (argv[1]);
|
ti->ti_modrdn = (char *) strdup (argv[1]);
|
||||||
|
|
||||||
|
|
@ -145,7 +149,7 @@ int tcl_back_db_config (
|
||||||
Debug (LDAP_DEBUG_ANY,
|
Debug (LDAP_DEBUG_ANY,
|
||||||
"%s: line %d: missing proc in \"add <proc>\" line\n",
|
"%s: line %d: missing proc in \"add <proc>\" line\n",
|
||||||
fname, lineno, 0);
|
fname, lineno, 0);
|
||||||
exit (1);
|
return( 1 );
|
||||||
}
|
}
|
||||||
ti->ti_add = (char *) strdup (argv[1]);
|
ti->ti_add = (char *) strdup (argv[1]);
|
||||||
|
|
||||||
|
|
@ -155,7 +159,7 @@ int tcl_back_db_config (
|
||||||
Debug (LDAP_DEBUG_ANY,
|
Debug (LDAP_DEBUG_ANY,
|
||||||
"%s: line %d: missing proc in \"delete <proc>\" line\n",
|
"%s: line %d: missing proc in \"delete <proc>\" line\n",
|
||||||
fname, lineno, 0);
|
fname, lineno, 0);
|
||||||
exit (1);
|
return( 1 );
|
||||||
}
|
}
|
||||||
ti->ti_delete = (char *) strdup (argv[1]);
|
ti->ti_delete = (char *) strdup (argv[1]);
|
||||||
|
|
||||||
|
|
@ -165,14 +169,14 @@ int tcl_back_db_config (
|
||||||
Debug (LDAP_DEBUG_ANY,
|
Debug (LDAP_DEBUG_ANY,
|
||||||
"%s: line %d: missing proc in \"abandon <proc>\" line\n",
|
"%s: line %d: missing proc in \"abandon <proc>\" line\n",
|
||||||
fname, lineno, 0);
|
fname, lineno, 0);
|
||||||
exit (1);
|
return( 1 );
|
||||||
}
|
}
|
||||||
ti->ti_search = (char *) strdup (argv[1]);
|
ti->ti_search = (char *) strdup (argv[1]);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
fprintf (stderr,
|
Debug (LDAP_DEBUG_ANY,
|
||||||
"Unknown tcl backend config: %s\n", argv[0]);
|
"Unknown tcl backend config: %s\n", argv[0], 0, 0);
|
||||||
exit (1);
|
return( 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -205,7 +209,7 @@ void readtclscript (char *script, Tcl_Interp * my_tcl)
|
||||||
if (f == NULL) {
|
if (f == NULL) {
|
||||||
Debug (LDAP_DEBUG_ANY, "Could not open scriptpath %s\n", script,
|
Debug (LDAP_DEBUG_ANY, "Could not open scriptpath %s\n", script,
|
||||||
0, 0);
|
0, 0);
|
||||||
exit (1);
|
return( 1 );
|
||||||
}
|
}
|
||||||
fclose (f);
|
fclose (f);
|
||||||
code = Tcl_EvalFile (my_tcl, script);
|
code = Tcl_EvalFile (my_tcl, script);
|
||||||
|
|
@ -214,6 +218,6 @@ void readtclscript (char *script, Tcl_Interp * my_tcl)
|
||||||
Tcl_GetVar (my_tcl, "errorInfo", TCL_GLOBAL_ONLY), 0);
|
Tcl_GetVar (my_tcl, "errorInfo", TCL_GLOBAL_ONLY), 0);
|
||||||
Debug (LDAP_DEBUG_ANY, "%s: error at line\n", script,
|
Debug (LDAP_DEBUG_ANY, "%s: error at line\n", script,
|
||||||
my_tcl->errorLine, 0);
|
my_tcl->errorLine, 0);
|
||||||
exit (1);
|
return( 1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue