Skip to content

Commit

Permalink
More c++ -> c style comments conversion.
Browse files Browse the repository at this point in the history
  • Loading branch information
dloman77 committed Nov 29, 2010
1 parent 2f7f990 commit 54bec98
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions tests/libNet/libNetTest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ int getValidPort(char* data) {
std::string portStr(data);
int port = atoi(data);

//Hardcode prolly not best for OS determined port range....
/* Hardcode prolly not best for OS determined port range.... */
if (port > 0x0000 && port < 0xFFFF) {
//More validation goes here, if needed.
/* More validation goes here, if needed. */
} else {
printUsage("Supplied Port '" + portStr + "' is invalid.");
bu_exit(1, "");
Expand Down Expand Up @@ -96,7 +96,7 @@ int main(int argc, char* argv[]) {
short port;
std::string ip("");

//Get app mode. Either client or server
/* Get app mode. Either client or server */
std::string cliServ(argv[1]);
std::transform(cliServ.begin(), cliServ.end(), cliServ.begin(), tolower);

Expand All @@ -121,50 +121,52 @@ int main(int argc, char* argv[]) {
PortalManager pm(port);
pm.start();

//listen for a loooong time.
GSThread::sleep(60 * 60); //1 hr
/* listen for a loooong time. */
GSThread::sleep(60 * 60); /* 1 hr */
logInfo("Shutting down...");
pm.shutdown();

} else {
PortalManager pm;
pm.start();

GSThread::sleep(3);
GSThread::sleep(2);

s = "Trying to connect to ";
s.append(ip.c_str());
s.append(":");
s.append(QString::number(port));
logInfo(s);

QString t(ip.c_str()); //this is dumb!
QString t(ip.c_str()); /* this is dumb! */
Portal* p = pm.connectToHost(t, port);

if (p != 0) {
GSThread::sleep(2);
GSThread::sleep(3);
TypeOnlyMsg tom(RUALIVE);
p->send(&tom);
GSThread::sleep(2);
logInfo("Shutting down...");
logInfo("Disconnecting...");
p->disconnect();
}

GSThread::sleep(2);
logInfo("Shutting down...");
logInfo("Shutting down Portal Manager...");
pm.shutdown();
}

GSThread::sleep(1);
logInfo("Shutting down JobManager...");
JobManager::getInstance()->shutdown(true);
GSThread::sleep(1);
return 0;
}

// Local Variables: ***
// mode: C++ ***
// tab-width: 8 ***
// c-basic-offset: 2 ***
// indent-tabs-mode: t ***
// End: ***
// ex: shiftwidth=2 tabstop=8
/*
* Local Variables:
* mode: C
* tab-width: 8
* indent-tabs-mode: t
* c-file-style: "stroustrup"
* End:
* ex: shiftwidth=4 tabstop=8
*/

0 comments on commit 54bec98

Please sign in to comment.