Other Mir 3 Problem but can Mir 2 help?

smoochy boys on tour

Geordiehc

Mad Dog Geo
VIP
Jul 4, 2007
2,827
49
195
Redditch, UK
Hey guys, im gettin message on my server alot when theres a peak in users, even though just a few days ago it was taking the same number and more

ExecGateBuffers->@pwork,ExecGateMsg

After searching google i realise that only Mir 2 people are gonna have knowledge of this as its all mir 2 threads about source so can you help me identify my problem (my incline is hardware related but what am i lacking?) thanks
 

Andreas

LOMCN Veteran
Veteran
Mar 12, 2008
2,695
21
145
Timisoara
Code:
procedure TRunSocket.ExecGateBuffers(nGateIndex:Integer;Gate:pTGateInfo;Buffer:PChar;nMsgLen:Integer);
var
  nLen:Integer;
  Buff:PChar;
  MsgBuff:PChar;
  MsgHeader:pTMsgHeader; //0x20
  nCheckMsgLen:Integer;
  TempBuff:PChar;
ResourceString
  sExceptionMsg1 = '[Exception] TRunSocket::ExecGateBuffers -> pBuffer';
  [B][COLOR=#ff0000]sExceptionMsg2 = '[Exception] TRunSocket::ExecGateBuffers -> @pwork,ExecGateMsg ';[/COLOR][/B]
  sExceptionMsg3 = '[Exception] TRunSocket::ExecGateBuffers -> FreeMem';
begin
  nLen:=0;
  Buff:=nil;
  try
    if Buffer <> nil then begin
      ReallocMem(Gate.Buffer,Gate.nBuffLen + nMsgLen);
      Move(Buffer^,Gate.Buffer[Gate.nBuffLen],nMsgLen);
    end;
  except
    MainOutMessage(sExceptionMsg1);
  end;
  [B][COLOR=#0000ff]try[/COLOR][/B]
    nLen:=Gate.nBuffLen + nMsgLen;
    Buff:=Gate.Buffer;
    if nLen >= SizeOf(TMsgHeader) then begin
      while (True) do begin
        {
        pMsg:=pTMsgHeader(Buff);
        if pMsg.dwCode = RUNGATECODE then begin
          if nLen < (pMsg.nLength + SizeOf(TMsgHeader)) then break;
          MsgBuff:=@Buff[SizeOf(TMsgHeader)];
        }

        MsgHeader:=pTMsgHeader(Buff);
        nCheckMsgLen:=abs(MsgHeader.nLength) + SizeOf(TMsgHeader);
         
        if (MsgHeader.dwCode = RUNGATECODE) and (nCheckMsgLen < $8000) then begin
          if nLen < nCheckMsgLen then break;
          MsgBuff:=Buff + SizeOf(TMsgHeader);//Jacky 1009 »»ÉÏ
          //MsgBuff:=@Buff[SizeOf(TMsgHeader)];


          ExecGateMsg(nGateIndex,Gate,MsgHeader,MsgBuff,MsgHeader.nLength);
          Buff:=Buff + SizeOf(TMsgHeader) + MsgHeader.nLength;//Jacky 1009 »»ÉÏ
          //Buff:=@Buff[SizeOf(TMsgHeader) + pMsg.nLength];
          nLen:= nLen - (MsgHeader.nLength + SizeOf(TMsgHeader));
        end else begin
          Inc(Buff);
          Dec(nLen);
        end;
        if nLen < SizeOf(TMsgHeader) then break;
      end;
    end;
  [COLOR=#0000ff][B]except[/B][/COLOR]
   [COLOR=#ff0000][B] MainOutMessage(sExceptionMsg2);[/B][/COLOR]

well here is the code run on where you get the error but , the error doesnt specify whats going wrong , just that something between try - except went wrong so instead of finishing the task , it jumps to except and shows the error .

i'm afraid that without deep testing i cant tell u whats exacly causing it sorry.
 
Upvote 0

thedeath

LOMCN Developer
Developer
Mar 26, 2003
1,347
95
294
also that code is from the mir2 server files, it could be completely recoded in the mir3 files from wemade :(
 
Upvote 0