int svc_start(void)
{
+ int rc;
SERVICE_TABLE_ENTRY ste[] =
{
{ PROGRAM_NAME, svc_main },
// This call is blocking. A new thread is created which will launch
// the svc_main() function
- if (StartServiceCtrlDispatcher(ste) == 0) {
+ if ((rc = StartServiceCtrlDispatcher(ste)) == 0) {
pcap_win32_err_to_str(GetLastError(), string);
rpcapd_log(LOGPRIO_ERROR,
"StartServiceCtrlDispatcher() failed: %s", string);
void sock_fmterror(const char *caller, int errcode, char *errbuf, int errbuflen)
{
#ifdef _WIN32
- int retval;
char message[SOCK_ERRBUF_SIZE]; /* We're forcing "ANSI" */
if (errbuf == NULL)