1
mirror of https://github.com/rapid7/metasploit-payloads synced 2024-11-26 17:41:08 +01:00

Remove last of the warnings/errors after merging

This commit is contained in:
OJ 2013-11-14 19:33:20 +10:00
parent 1c09ac08d5
commit 70d958b729
8 changed files with 13 additions and 29 deletions

View File

@ -33,8 +33,6 @@ Command customCommands[] =
*/
DWORD __declspec(dllexport) InitServerExtension(Remote *remote)
{
DWORD index;
hMetSrv = remote->hMetSrv;
command_register_all( customCommands );

View File

@ -195,8 +195,6 @@ Command customCommands[] =
*/
DWORD __declspec(dllexport) InitServerExtension(Remote *remote)
{
DWORD index;
hMetSrv = remote->hMetSrv;
command_register_all( customCommands );

View File

@ -157,9 +157,7 @@ Command customCommands[] =
/*
* Initialize the server extension
*/
DWORD __declspec(dllexport) InitServerExtension(Remote *remote){
DWORD index;
DWORD __declspec(dllexport) InitServerExtension(Remote *remote) {
hMetSrv = remote->hMetSrv;
command_register_all( customCommands );
@ -167,10 +165,11 @@ DWORD __declspec(dllexport) InitServerExtension(Remote *remote){
dhcpserver = createDHCPServer();
tftpserver = createTFTPServer();
if(tftpserver)
if (tftpserver) {
return ERROR_SUCCESS;
else
return ERROR_NOT_ENOUGH_MEMORY;
}
return ERROR_NOT_ENOUGH_MEMORY;
}
/*
@ -178,8 +177,6 @@ DWORD __declspec(dllexport) InitServerExtension(Remote *remote){
*/
DWORD __declspec(dllexport) DeinitServerExtension(Remote *remote)
{
DWORD index;
destroyTFTPServer(tftpserver);
tftpserver = NULL;

View File

@ -97,8 +97,6 @@ Command customCommands[] =
*/
DWORD __declspec(dllexport) InitServerExtension(Remote *remote)
{
DWORD index;
hMetSrv = remote->hMetSrv;
command_register_all( customCommands );

View File

@ -1114,8 +1114,6 @@ Command customCommands[] =
*/
DWORD __declspec(dllexport) InitServerExtension(Remote *remote)
{
DWORD index;
#ifdef _WIN32
// This handle has to be set before calls to command_register
// otherwise we get obscure crashes!

View File

@ -179,7 +179,6 @@ DWORD __declspec(dllexport) InitServerExtension(Remote *remote)
DWORD InitServerExtension(Remote *remote)
#endif
{
DWORD index;
#ifdef _WIN32
hMetSrv = remote->hMetSrv;
#endif

View File

@ -116,8 +116,8 @@ private:
/*! @brief Valid actions that can be invoked on the webcam control thread. */
typedef enum
{
Stop = 1, ///< Tell the webcam control thread to terminate.
GetFrame = 2 ///< Tell the webcam control thread to capture a frame.
StopCamera = 1, ///< Tell the webcam control thread to terminate.
GetCameraFrame = 2 ///< Tell the webcam control thread to capture a frame.
} WebcamAction;
/*! @brief State structure which is used for C&C of the webcam control thread. */
@ -486,13 +486,13 @@ DWORD THREADCALL webcam_control_thread(THREAD * thread)
switch (state->controlAction)
{
case Stop:
dprintf("[WEBCAM] ACTION_STOP called.");
case StopCamera:
dprintf("[WEBCAM] StopCamera called.");
dwResult = ERROR_SUCCESS;
state->bRunning = FALSE;
break;
case GetFrame:
dprintf("[WEBCAM] ACTION_GETFRAME called.");
case GetCameraFrame:
dprintf("[WEBCAM] GetCameraFrame called.");
dwResult = webcam_get_frame(state);
event_signal(state->pResultEvent);
break;
@ -744,7 +744,7 @@ DWORD request_webcam_get_frame(Remote *remote, Packet *packet)
// set up the thread call
g_pThreadState->pResponse = response;
g_pThreadState->frameQuality = quality;
g_pThreadState->controlAction = GetFrame;
g_pThreadState->controlAction = GetCameraFrame;
// invoke and wait
event_signal(g_pThreadState->pCallEvent);
@ -785,7 +785,7 @@ DWORD request_webcam_stop(Remote *remote, Packet *packet) {
}
// set up the thread call
g_pThreadState->controlAction = Stop;
g_pThreadState->controlAction = StopCamera;
// invoke and wait
event_signal(g_pThreadState->pCallEvent);

View File

@ -23,8 +23,6 @@ Command customCommands[] =
*/
VOID register_dispatch_routines()
{
DWORD index;
extension_list = list_create();
command_register_all( customCommands );
@ -35,8 +33,6 @@ VOID register_dispatch_routines()
*/
VOID deregister_dispatch_routines( Remote * remote )
{
DWORD index;
while( TRUE )
{
EXTENSION * extension = list_pop( extension_list );