Update of /cvsroot/fura/FuraSrc/common/specific/src
In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv8372/FuraSrc/common/specific/src
Modified Files:
ProcessList.cpp SystemManager.cpp
Log Message:
cvssync-20080903232636
Index: SystemManager.cpp
===================================================================
RCS file: /cvsroot/fura/FuraSrc/common/specific/src/SystemManager.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** SystemManager.cpp 22 May 2008 14:55:51 -0000 1.2
--- SystemManager.cpp 3 Sep 2008 21:27:24 -0000 1.3
***************
*** 112,115 ****
--- 112,116 ----
#include <ifaddrs.h>
#include <net/if_dl.h>
+ #include <sys/socket.h>
#elif __linux__
#include <sys/ioctl.h>
***************
*** 713,717 ****
--- 714,722 ----
}
+ #ifdef __DARWIN__
+ hp = gethostbyname2(hostname, AF_INET);
+ #else
hp = gethostbyname(hostname);
+ #endif
if(hp == NULL) {
***************
*** 719,723 ****
return "";
}
!
memcpy(&in.s_addr, hp->h_addr_list[0], sizeof (in.s_addr));
s = inet_ntoa(in);
--- 724,728 ----
return "";
}
!
memcpy(&in.s_addr, hp->h_addr_list[0], sizeof (in.s_addr));
s = inet_ntoa(in);
Index: ProcessList.cpp
===================================================================
RCS file: /cvsroot/fura/FuraSrc/common/specific/src/ProcessList.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ProcessList.cpp 22 Aug 2008 22:16:31 -0000 1.3
--- ProcessList.cpp 3 Sep 2008 21:27:24 -0000 1.4
***************
*** 804,808 ****
#elif __HPUX__
! struct pst_status pst[BURST];
int counter;
int idx = 0; /* index within the context */
--- 804,808 ----
#elif __HPUX__
! struct pst_status *pst = new pst_status[BURST];
int counter;
int idx = 0; /* index within the context */
***************
*** 843,846 ****
--- 843,847 ----
localTime = SystemManager::getLocalTime();
+ delete pst;
TOLOG(7, "getIdleTime: cpuTime is " << cpuTime << " and localTime is " <<
localTime);
***************
*** 1303,1307 ****
#elif __HPUX__
! struct pst_status pst[BURST];
int procCount;
int idx = 0; /* index within the context */
--- 1304,1308 ----
#elif __HPUX__
! struct pst_status *pst = new pst_status[BURST];
int procCount;
int idx = 0; /* index within the context */
***************
*** 1352,1355 ****
--- 1353,1357 ----
//cout << "Done." << endl;
+ delete pst;
if (procCount == -1) {
perror("Error: pstat_getproc()");
|