Commit 5a737f9c authored by claes's avatar claes

Restart if bind error

parent 0bdae90d
/*
* Proview $Id: opc_server.cpp,v 1.15 2007-04-30 07:29:27 claes Exp $
* Proview $Id: opc_server.cpp,v 1.16 2007-05-22 08:21:17 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -164,6 +164,7 @@ int main()
qcom_sQid qini;
qcom_sQattr qAttr;
qcom_sQid qid = qcom_cNQid;
int restarts = 10;
sts = gdh_Init("opc_server");
if ( EVEN(sts)) {
......@@ -236,6 +237,8 @@ int main()
errh_SetStatus( PWR__SRUN);
soap_init( &soap);
for ( int k = 0; k < restarts + 1; k++) {
m = soap_bind( &soap, NULL, 18083, 100);
if ( m < 0)
soap_print_fault( &soap, stderr);
......@@ -275,6 +278,7 @@ int main()
}
}
}
}
soap_done( &soap); // Close master socket and detach environment
return SOAP_OK;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment