[SR-Dev] git:daniel/pv: fix add/lookup pv name

Daniel-Constantin Mierla miconda at gmail.com
Tue Dec 16 12:12:59 CET 2008


Module: sip-router
Branch: daniel/pv
Commit: 41c098d017d823bcff70872b7f185faee893b745
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=41c098d017d823bcff70872b7f185faee893b745

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Tue Dec 16 13:11:47 2008 +0200

fix add/lookup pv name

---

 pvapi.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/pvapi.c b/pvapi.c
index 9bb1de4..e93b459 100644
--- a/pvapi.c
+++ b/pvapi.c
@@ -120,13 +120,10 @@ int pv_table_add(pv_export_t *e)
 	{
 		if(pvi->pvid > pvid)
 			break;
-		if(pvi->pve.name.len > in->len)
-			break;
 		if(pvi->pve.name.len==in->len)
 		{
 			found = strncmp(pvi->pve.name.s, in->s, in->len);
-			if(found>0)
-				break;
+
 			if(found==0)
 			{
 				LM_ERR("pvar [%.*s] already exists\n", in->len, in->s);
@@ -334,8 +331,6 @@ pv_export_t* pv_lookup_spec_name(str *pvname, pv_spec_p e)
 	{
 		if(pvi->pvid > pvid)
 			break;
-		if(pvi->pve.name.len > pvname->len)
-			break;
 
 		if(pvi->pvid==pvid && pvi->pve.name.len==pvname->len
 			&& memcmp(pvi->pve.name.s, pvname->s, pvname->len)==0)




More information about the sr-dev mailing list