const IListener* listener=conf.getINI()->getListener();
// Create the SHAR listener socket
- if (!listener->create(sock))
+ if (!listener->create(sock)) {
+ conf.shutdown();
return -3;
+ }
// Bind to the proper port
- if (!listener->bind(sock))
+ if (!listener->bind(sock)) {
+ conf.shutdown();
return -4;
+ }
// Initialize the SHAR Utilitites
SHARUtils::init();
}
conf.shutdown();
- fprintf(stdout, "shar shutdown complete\n");
+ fprintf(stdout, "shibd shutdown complete\n");
}
return 0;
}
const IListener* listener=conf.getINI()->getListener();
// Create the SHAR listener socket
- if (!listener->create(sock))
+ if (!listener->create(sock)) {
+ conf.shutdown();
return -3;
+ }
// Bind to the proper port
- if (!listener->bind(sock, unlink_socket==1))
+ if (!listener->bind(sock, unlink_socket==1)) {
+ conf.shutdown();
return -4;
+ }
// Initialize the SHAR Utilitites
SHARUtils::init();
listener->close(sock);
fprintf(stderr, "shib socket closed\n");
}
-
+
conf.shutdown();
- fprintf(stderr, "shar shutdown complete\n");
+ fprintf(stderr, "shibd shutdown complete\n");
return 0;
}