Re: [Ipsec-tools-users] Two more patches to consider
Brought to you by:
mit_warlord,
netbsd
From: VANHULLEBUS Y. <va...@fr...> - 2006-10-21 18:38:12
|
On Fri, Oct 20, 2006 at 11:47:01AM +0100, Michal Ruzicka wrote: > Hello Hi. > I include two more patches to consider: The typos are ok, I'll review the other patch tomorrow and commit all that. Yvan. > This patch is a small optimization to the vmbuf reallocation strategy. > Signed-off-by: Michal Ruzicka <mic...@co...> > > diff -Naur ipsec-tools-0.6.6.orig/src/racoon/vmbuf.c ipsec-tools-0.6.6/src/racoon/vmbuf.c > --- ipsec-tools-0.6.6.orig/src/racoon/vmbuf.c 2005-01-30 21:34:05.000000000 +0100 > +++ ipsec-tools-0.6.6/src/racoon/vmbuf.c 2006-10-16 12:20:42.000000000 +0200 > @@ -75,19 +75,17 @@ > size_t size; > { > caddr_t v; > - > - if (ptr != NULL) { > - if (ptr->l == 0) { > - (void)vfree(ptr); > - return vmalloc(size); /* zero-fill it? */ > - } > > - if ((v = (caddr_t)racoon_realloc(ptr->v, size)) == NULL) { > + if (ptr != NULL) { > + v = (ptr->l > 0) > + ? (caddr_t)racoon_realloc(ptr->v, size) > + : (caddr_t)racoon_calloc(1, size); > + if (v == NULL) { > (void)vfree(ptr); > return NULL; > } > > - if ( size > ptr->l) > + if (ptr->l > 0 && size > ptr->l) > memset(v + ptr->l, 0, size - ptr->l); > ptr->v = v; > ptr->l = size; > > This one just corrects a few typos. > Signed-off-by: Michal Ruzicka <mic...@co...> > > diff -Naur ipsec-tools-0.6.6.orig/src/racoon/backupsa.c ipsec-tools-0.6.6/src/racoon/backupsa.c > --- ipsec-tools-0.6.6.orig/src/racoon/backupsa.c 2004-11-14 17:37:16.000000000 +0100 > +++ ipsec-tools-0.6.6/src/racoon/backupsa.c 2006-10-16 12:17:28.000000000 +0200 > @@ -333,7 +333,7 @@ > e_type, e_keylen, a_type, a_keylen, flags, > 0, l_bytes, l_addtime, 0, seq) < 0) { > plog(LLV_ERROR, LOCATION, NULL, > - "restore SA filed line#%d in %s: %s\n", > + "restore SA failed line#%d in %s: %s\n", > line, lcconf->pathinfo[LC_PATHTYPE_BACKUPSA], ipsec_strerror()); > } > racoon_free(src); > diff -Naur ipsec-tools-0.6.6.orig/src/racoon/cfparse.y ipsec-tools-0.6.6/src/racoon/cfparse.y > --- ipsec-tools-0.6.6.orig/src/racoon/cfparse.y 2006-10-11 10:08:02.000000000 +0200 > +++ ipsec-tools-0.6.6/src/racoon/cfparse.y 2006-10-16 12:17:34.000000000 +0200 > @@ -1413,7 +1413,7 @@ > struct etypes *new; > new = racoon_malloc(sizeof(struct etypes)); > if (new == NULL) { > - yyerror("filed to allocate etypes"); > + yyerror("failed to allocate etypes"); > return -1; > } > new->type = $2; > > Thanks > Michal Ruzicka > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Ipsec-tools-users mailing list > Ips...@li... > https://lists.sourceforge.net/lists/listinfo/ipsec-tools-users |