You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by jf...@apache.org on 2002/01/15 10:43:14 UTC
cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_map.c
jfclere 02/01/15 01:43:14
Modified: jk/native2/common jk_map.c
Log:
Return default value if not found.
Revision Changes Path
1.13 +6 -2 jakarta-tomcat-connectors/jk/native2/common/jk_map.c
Index: jk_map.c
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_map.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- jk_map.c 12 Jan 2002 05:08:57 -0000 1.12
+++ jk_map.c 15 Jan 2002 09:43:13 -0000 1.13
@@ -58,7 +58,7 @@
/***************************************************************************
* Description: General purpose map object *
* Author: Gal Shachor <sh...@il.ibm.com> *
- * Version: $Revision: 1.12 $ *
+ * Version: $Revision: 1.13 $ *
***************************************************************************/
#include "jk_global.h"
@@ -287,6 +287,7 @@
char *def)
{
char buf[1024];
+ char *res;
if( m==NULL || objName==NULL || pname==NULL ) {
return def;
@@ -295,7 +296,10 @@
sprintf(buf, "%s.%s", objName, pname);
else
sprintf(buf, "%s.%s.%s", objType, objName, pname);
- return m->get(env, m, buf );
+ res = m->get(env, m, buf );
+ if (res==NULL)
+ return(def);
+ return res;
}
int jk_map_getIntProp(jk_env_t *env, jk_map_t *m,
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>