Style clean up.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36810 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Pfeiffer 2010-05-14 09:36:26 +00:00
parent 13dfd6ccca
commit 4339f8be19

View File

@ -45,7 +45,10 @@
// Implementation of HPJetDirectPort
HPJetDirectPort::HPJetDirectPort(BDirectory* printer, BMessage *msg)
: fPort(9100), fEndpoint(NULL), fReady(B_ERROR)
:
fPort(9100),
fEndpoint(NULL),
fReady(B_ERROR)
{
fHost[0] = '\0';
@ -62,14 +65,14 @@ HPJetDirectPort::HPJetDirectPort(BDirectory* printer, BMessage *msg)
dir.ReadAttr("hp_jetdirect:host", B_STRING_TYPE, 0, fHost, sizeof(fHost));
dir.ReadAttr("hp_jetdirect:port", B_UINT16_TYPE, 0, &fPort, sizeof(fPort));
};
}
fEndpoint = new BNetEndpoint(SOCK_STREAM);
if ((fReady = fEndpoint->InitCheck()) != B_OK) {
BAlert *alert = new BAlert("", "Fail to create the NetEndpoint!", "OK");
alert->Go();
return;
};
}
if (fEndpoint->Connect(fHost, fPort) == B_OK) {
printf("Connected to HP JetDirect printer port at %s:%d\n", fHost, fPort);
@ -78,7 +81,7 @@ HPJetDirectPort::HPJetDirectPort(BDirectory* printer, BMessage *msg)
BAlert *alert = new BAlert("", "Can't connect to HP JetDirect printer port!", "OK");
alert->Go();
fReady = B_ERROR;
};
}
}