Update of /cvsroot/linuxisns/isnsNT/isnsserver/src
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv30524/src
Modified Files:
iSNSdb.c iSNSparse.c
Log Message:
use correct ipaddr convert
Index: iSNSparse.c
===================================================================
RCS file: /cvsroot/linuxisns/isnsNT/isnsserver/src/iSNSparse.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** iSNSparse.c 14 Dec 2006 23:04:28 -0000 1.12
--- iSNSparse.c 14 Dec 2006 23:27:50 -0000 1.13
***************
*** 163,172 ****
case ISNS_MGMT_IP:
case ISNS_PORTAL_IP:
if (len != ISNS_IP_SIZE && len != 0)
rval = FALSE;
! DEBUG_4 (sns_parse_debug &1,%sTag:%i (%s) %s,src,tag,isnsTagText(tag),
! inet_ntoa(*(struct in_addr *)(ptr+12)) );
break;
!
case ISNS_TIMESTAMP:
if (len != ISNS_TIMESTAMP_SIZE && len != 0 )
--- 163,174 ----
case ISNS_MGMT_IP:
case ISNS_PORTAL_IP:
+ {
+ char ipaddr[256];
if (len != ISNS_IP_SIZE && len != 0)
rval = FALSE;
! ipaddrchar (ptr,ipaddr);
! DEBUG_4 (sns_parse_debug &1,%sTag:%i (%s) %s,src,tag,isnsTagText(tag),ipaddr);
break;
! }
case ISNS_TIMESTAMP:
if (len != ISNS_TIMESTAMP_SIZE && len != 0 )
Index: iSNSdb.c
===================================================================
RCS file: /cvsroot/linuxisns/isnsNT/isnsserver/src/iSNSdb.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** iSNSdb.c 14 Dec 2006 23:04:28 -0000 1.18
--- iSNSdb.c 14 Dec 2006 23:27:50 -0000 1.19
***************
*** 205,211 ****
{
SOIP_DB_Portal db_portal;
memcpy(&db_portal,&key->val,sizeof(SOIP_DB_Portal));
! DEBUG_2 (isns_db_debug &1,read Portal ip_addr:%s port:%i,
! inet_ntoa(*(struct in_addr *)(db_portal.ip_addr.v+12)),db_portal.ip_port);
k.dptr = (char *)&key->val;
--- 205,212 ----
{
SOIP_DB_Portal db_portal;
+ char ipaddr[256];
memcpy(&db_portal,&key->val,sizeof(SOIP_DB_Portal));
! ipaddrchar(&db_portal.ip_addr,ipaddr);
! DEBUG_2 (isns_db_debug &1,read Portal ip_addr:%s port:%i,ipaddr,db_portal.ip_port);
k.dptr = (char *)&key->val;
***************
*** 214,219 ****
if (d.dptr == NULL)
{
! DEBUG_2 (isns_db_debug &1,read failed Portal ip_addr:%s port:%i,
! inet_ntoa(*(struct in_addr *)(db_portal.ip_addr.v+12)),db_portal.ip_port);
return (ISNS_NO_SUCH_ENTRY_ERR);
}
--- 215,219 ----
if (d.dptr == NULL)
{
! DEBUG_2 (isns_db_debug &1,read failure Portal ip_addr:%s port:%i,ipaddr,db_portal.ip_port);
return (ISNS_NO_SUCH_ENTRY_ERR);
}
|