[Common-cvs] container hxstrfmt.cpp,1.22,1.22.4.1

[Common-cvs] container hxstrfmt.cpp,1.22,1.22.4.1

svaidhya at helixcommunity.org svaidhya at helixcommunity.org
Tue Feb 1 18:18:22 PST 2011


Update of /cvsroot/common/container
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv18090

Modified Files:
      Tag: SERVER_14_2
	hxstrfmt.cpp 
Log Message:
Synopsis
=======
CR: Fix for Bug 269287: Proxy Monitor stats for Proxies aren't updated

Branches:  HEAD, 14.2
Reviewer: Dean

Description
=======

Proxy adds the Client & Gateway Stats in the registry as INT64 (using the new IHXRegistry2 interface for 64 bits)
The Java monitor queries the registry for these values and displays.
The Admin system was using the old IHXRegistry and was not recognizing 64-bit values (of type PT_INTEGER64)

Modified the Admin system to use the IHXRegistry2.

This bug also reflected in regview, in that, some variables/lists were not displayed properly.

Also, For display of these 64bit values, the Admin uses CHXString::Format(), which accepts the format specifier as
an argument.
Modified the method to support %lld as format specifier for 64 bit values


Files Affected
===========
./server/fs/adminfs/adminfo.cpp
./server/fs/adminfs/adminfo.h
./server/fs/adminfs/reg_2_js.cpp
./server/fs/adminfs/reg_2_js.h
./common/container/hxstrfmt.cpp


Testing Performed
===========
Unit Tests:
- None

Integration Tests:
- Verified that the Client Stats and Gateway stats are reflected on the Java Monitor as expected
- Accessing regview displays the registry properties as expected.

Leak Tests:
- None

Performance Tests:
- None

Build verified:win-x86_64--vc10
Platform tested :win-x86_64--vc10





Index: hxstrfmt.cpp
===================================================================
RCS file: /cvsroot/common/container/hxstrfmt.cpp,v
retrieving revision 1.22
retrieving revision 1.22.4.1
diff -u -d -r1.22 -r1.22.4.1
--- hxstrfmt.cpp	18 May 2010 17:51:23 -0000	1.22
+++ hxstrfmt.cpp	2 Feb 2011 02:18:19 -0000	1.22.4.1
@@ -77,6 +77,7 @@
 static const int NoLength = 0;
 static const int ShortLength = 1;
 static const int LongLength = 2;
+static const int LongLongLength = 3;
 
 static const int MaxConversionSize = 32;
 static const int MaxFormatSize = 11;
@@ -209,7 +210,15 @@
 
     switch(*pCur) {
     case 'l':
-	ret = LongLength;
+	if (*(pCur+1) == 'l')
+	{
+           ret = LongLongLength;
+           pCur++;
+	}
+	else
+	{
+	    ret = LongLength;
+	}
 	pCur++;
 	break;
     case 'h':
@@ -256,6 +265,11 @@
     if (length == LongLength)
 	fmt[i++] = 'l';
 
+    if (length == LongLongLength)
+    {
+        fmt[i++] = 'l';
+        fmt[i++] = 'l';
+    }
 
     fmt[i++] = type;
     fmt[i] = '\0';
@@ -290,6 +304,7 @@
 CONVERT_FUNC_DEF(ConvertInt, int)
 CONVERT_FUNC_DEF(ConvertShort, short int)
 CONVERT_FUNC_DEF(ConvertLong, long int)
+CONVERT_FUNC_DEF(ConvertLongLong, long long int)
 CONVERT_FUNC_DEF(ConvertUInt, unsigned int)
 CONVERT_FUNC_DEF(ConvertUShort, unsigned short int)
 CONVERT_FUNC_DEF(ConvertULong, unsigned long int)
@@ -393,7 +408,12 @@
 
 	    ConstructFormat(fmt, type, flags, length, precision);
 
-	    if (length == LongLength)
+            if (length == LongLongLength)
+	    {
+		long int val = va_arg(args, long long int);
+		convertSize = ConvertLongLong(fmt, width, precision, val);
+	    }
+            else if (length == LongLength)
 	    {
 		long int val = va_arg(args, long int);
 		convertSize = ConvertLong(fmt, width, precision, val);




More information about the Common-cvs mailing list
 

Site Map   |   Terms of Use   |   Privacy Policy   |   Contact Us

Copyright © 1995-2007 RealNetworks, Inc. All rights reserved. RealNetworks and Helix are trademarks of RealNetworks.
All other trademarks or registered trademarks are the property of their respective holders.