Forum Discussion
Mar 05, 2010
I'm looking through the sources and it seems that any request for START, STOP, REINIT, AND RESTART for SERVICE_HTTPD is silently ignored. This should probably thrown an exception to let you know that it didn't work. I can understand the reasoning for disabling it though as a restart or reinit will break the current iControl request and the call will return a transport error.
In case you are interested, here's the code block with the developers comment
for (unsigned int i = 0; i < services.size(); i++)
{
// we will silently ignore request to start/stop/reinit/restart httpd
// since that would be BAD !
if (services[ i ] == System::Services::SERVICE_HTTPD &&
(action == System::Services::SERVICE_ACTION_START ||
action == System::Services::SERVICE_ACTION_STOP ||
action == System::Services::SERVICE_ACTION_REINIT ||
action == System::Services::SERVICE_ACTION_RESTART))
{
continue;
}
...
}
I guess the "since that would be BAD !" is the fact that it will break the current iControl request B-).
-Joe