cvs: php4 /ext/mnogosearch php_mnogo.c

From: Date: Mon, 10 Jun 2002 16:46:20 +0000
Subject: cvs: php4 /ext/mnogosearch php_mnogo.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-12293@lists.php.net to get a copy of this message
gluke Mon Jun 10 12:46:20 2002 EDT Modified files: /php4/ext/mnogosearch php_mnogo.c Log: # Mnogosearch new function calls fixes Index: php4/ext/mnogosearch/php_mnogo.c diff -u php4/ext/mnogosearch/php_mnogo.c:1.56 php4/ext/mnogosearch/php_mnogo.c:1.57 --- php4/ext/mnogosearch/php_mnogo.c:1.56 Mon Jun 10 08:24:42 2002 +++ php4/ext/mnogosearch/php_mnogo.c Mon Jun 10 12:46:03 2002 @@ -1,5 +1,5 @@ /* $Source: /usr/repository/php4/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.56 2002/06/10 12:24:42 gluke Exp $ */ +/* $Id: php_mnogo.c,v 1.57 2002/06/10 16:46:03 gluke Exp $ */ /* +----------------------------------------------------------------------+ @@ -868,7 +868,11 @@ break; case UDM_PARAM_STOPFILE: +#if UDM_VERSION_ID >= 30204 + if (UdmStopListLoad(Agent->Conf,val)) { +#else if (UdmFileLoadStopList(Agent->Conf,val)) { +#endif php_error(E_WARNING,Agent->Conf->errstr); RETURN_FALSE; } @@ -1933,7 +1937,10 @@ cat = Z_STRVAL_PP(yycat); #if UDM_VERSION_ID >= 30204 - if(UdmCatList(Agent,c,cat)){ + if (NULL==(c=(UDM_CATEGORY *)malloc(sizeof(UDM_CATEGORY)))) RETURN_FALSE; + if (NULL==(c->Category=malloc(sizeof(UDM_CATITEM)))) RETURN_FALSE; + strncpy(c->addr,cat,sizeof(c->addr)-1); + if(UdmCatAction(Agent,c,UDM_CAT_ACTION_LIST,Agent->Conf->db)){ #else if((c=UdmCatList(Agent,cat))){ #endif @@ -1964,7 +1971,11 @@ } #endif free(buf); - } else { +#if UDM_VERSION_ID >= 30204 + free(c->Category); + free(c); +#endif +} else { RETURN_FALSE; } } @@ -1997,7 +2008,10 @@ cat = Z_STRVAL_PP(yycat); #if UDM_VERSION_ID >= 30204 - if(UdmCatPath(Agent,c,cat)){ + if (NULL==(c=(UDM_CATEGORY *)malloc(sizeof(UDM_CATEGORY)))) RETURN_FALSE; + if (NULL==(c->Category=malloc(sizeof(UDM_CATITEM)))) RETURN_FALSE; + strncpy(c->addr,cat,sizeof(c->addr)-1); + if(UdmCatAction(Agent,c,UDM_CAT_ACTION_PATH,Agent->Conf->db)){ #else if((c=UdmCatPath(Agent,cat))){ #endif @@ -2028,6 +2042,10 @@ } #endif free(buf); +#if UDM_VERSION_ID >= 30204 + free(c->Category); + free(c); +#endif } else { RETURN_FALSE; } @@ -2055,7 +2073,11 @@ break; } ZEND_FETCH_RESOURCE(Agent, UDM_AGENT *, yyagent, id, "mnoGoSearch-Agent", le_link); +#if UDM_VERSION_ID >= 30204 + RETURN_LONG(UdmURLAction(Agent,NULL,UDM_URL_ACTION_DOCCOUNT,Agent->Conf->db)); +#else RETURN_LONG(UdmGetDocCount(Agent)); +#endif } /* }}} */ #endif

« previous php.cvs (#12293) next »