AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Module Coding (https://forums.alliedmods.net/forumdisplay.php?f=9)
-   -   Fixed SQL_ThreadQuery Server Pause (https://forums.alliedmods.net/showthread.php?t=177759)

201724 02-06-2012 01:43

Fixed SQL_ThreadQuery Server Pause
 
1 Attachment(s)
I don't compile mysql_amxx so write the module

if player connect use SQL_ThreadQuery Read Access

If the replacement map when players enter WaitForWingleObject unable to return will result in:nono:

the module fix the bug

add amxx the code
native StopThread();
public plugin_end()
{
StopThread();
}


please delete old code and add the code:(2 function)

static cell AMX_NATIVE_CALL StopThread(AMX *amx, cell *params)
{
if(ThreadSaves)
{
TerminateThread(ThreadSaves,0);
CloseHandle(ThreadSaves);
ThreadSaves = NULL;
return 1;
}
return 0;
}

VOID OnAmxxDetach()
{
cbThread->UnInstallApiHook();
if(ThreadSaves)
{
TerminateThread(ThreadSaves,0);
CloseHandle(ThreadSaves);
ThreadSaves = NULL;
}
}

wangningyu 02-06-2012 02:14

Re: Fixed SQL_ThreadQuery Server Pause
 
Thans for share !

///////////////////////////////////////////////////////

if the result counts more than 100,000

it must be used. :)

201724 02-06-2012 05:48

Re: Fixed SQL_ThreadQuery Server Pause
 
i 'm compile mysql_amxx error i used vc6 but use mysql the libmysql.lib compile success................................

dFF 02-07-2012 10:06

Re: Fixed SQL_ThreadQuery Server Pause
 
You should report that bug.

Also, linux version ?

201724 02-12-2012 01:55

Re: Fixed SQL_ThreadQuery Server Pause
 
fix WaitForSingleObject dwMilliseconds not -1

public client_putinserver(id)
{
SQL_ThreadQuery(...);
}

changer maps player join server the thread be wait..... not return...use TerminateThread the API Kill the mysql_amxx threads

GordonFreeman (RU) 02-12-2012 02:55

Re: Fixed SQL_ThreadQuery Server Pause
 
Can you made it for SQLite?

201724 02-12-2012 09:41

Re: Fixed SQL_ThreadQuery Server Pause
 
I no use SQLite,,,,sorry

senecas 04-01-2012 01:46

Re: Fixed SQL_ThreadQuery Server Pause
 
Plz, Can someone compile in linux.
or Teach me how to compile module in linux.

claudiuhks 04-01-2012 04:38

Re: Fixed SQL_ThreadQuery Server Pause
 
Quote:

Originally Posted by senecas (Post 1679632)
Plz, Can someone compile in linux.
or Teach me how to compile module in linux.

Using a (virtual) machine running Linux with Makefile.

senecas 04-01-2012 20:40

Re: Fixed SQL_ThreadQuery Server Pause
 
Quote:

Originally Posted by claudiuhks (Post 1679717)
Using a (virtual) machine running Linux with Makefile.

I mean "how to"...
I already have linux(ubuntu).
as I heard, I need some hl sdk, metamod source stuff like that.
Is there any tutorial about this ?
it is not, You can teach me step by step.
or you can share your (vm/vbox) virtual disk file. :)


All times are GMT -4. The time now is 14:32.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.