🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #899

Re: Important - Need help testing new Indy version and fast!

#899
From: Paul at NCF
Date: Wed, 22 Aug 2007 07:11
102 lines
4763 bytes
"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message 
news:46c9d309@newsgroups.borland.com...
>
> Please be more specific.  What exactly did you remove, and from where
> exactly?

This is in my mainform header.  Not sure why or if I needed to have these 
before, but leaving them in causes the linker error with Indy10.  Commenting 
them out of my application links okay, and doesn't appear to cause any 
problems.

[Linker Fatal Error] Fatal: Unable to open file 'IDANTIFREEZE.OBJ'

#ifndef MainFormH
#define MainFormH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <SysLogServerTask.h>
#include <IdBaseComponent.hpp>
//#include <IdAntiFreeze.hpp>
//#include <IdAntiFreezeBase.hpp>
//---------------------------------------------------------------------------

> What calls are you referring to exactly?  Where are you seeing the data
> appear?  Again, you need to be more specific.

I assume my email answered this further on

> Since there is no such output being generated by Indy, I have to assume 
> that
> you are formatting the message data into your own string value.  Please 
> show
> your actual code so we can see what fields you are using.

Yes, this is my output, eg.

SysLogClientTask::ProcessSysLogMessage(TIdSysLogMessage * msg)
{
            AnsiString tstr = "";
            AnsiString seve = "";
            AnsiString faci = "";
            AnsiString mpid = msg->Msg->PID;
            AnsiString mesg = msg->Msg->Content;
            AnsiString proc = msg->Msg->Process;
            AnsiString host = msg->Hostname;
            AnsiString peer = msg->Peer;
            AnsiString prio = msg->Pri;
            TDateTime  time = msg->TimeStamp;
            .... some processing of time string and then
            tstr += host;
            tstr += Separator;
            tstr += peer;
            tstr += Separator;
            tstr += mpid;
            tstr += Separator;
            tstr += proc;
            tstr += Separator;
            tstr += prio;
            tstr += Separator;
            tstr += seve;
            tstr += Separator;
            tstr += faci;
            tstr += Separator;
            tstr += mesg;
            tstr += "\r\n";

> You are not assigning anything to the TIdSysLogMessage::Hostname property 
> in
> your code.  Looking at the source code for TIdSysLogMessage, I see that it
> tries to assign a default value to that property inside of the
> TIdSysLogMessage::InitComponent() method.  However, something I observed
> last week was that the InitComponent() method is not always called 
> correctly
> under C++.  I have no idea why yet.

This is what I saw, I presume there is a way of filling in the property, but 
since the code looked like it should be doing it (and does in one particular 
scenario), I raised it as a query on the Indy10 snapshot.

> The send/receive methods need some explanation.  You can't pass raw memory
> buffers to Indy anymore, mainly due to the .NET support.  In this 
> particular
> case, you will have to wrap your data into a TIdBytes.  For sending data,
> you can use RawToBytes().  For receiving data, you can use BytesToRaw().
> For example:
>
>    IdUDPClient->SendBuffer(RawToBytes(Udata, Ulength));
>
>    TIdBytes buf;
>    buf.Length = DataSize;
>    DataSize = IdUDPClient->ReceiveBuffer(buf, Wait);
>    BytesToRaw(buf, Data, DataSize);
>    RxBuf->Ulength = DataSize;

Thanks, just wanted to be sure before diving down a dead end.  I'll give 
this a go when I can (as I'm also trying to get a system out by next week)

Paul 
Technical Details
Message-ID: <46cbe19b@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <46bd01a2$1@newsgroups.borland.com> <46bec059$1@newsgroups.borland.com> <46c70d07$1@newsgroups.borland.com> <46c9d309@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,e3c7f9e2088e8b5
X-Google-Attributes: gid11508e,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Paul at NCF" <notplmacca@clara.co.uk>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <46bd01a2$1@newsgroups.borland.com> <46bec059$1@newsgroups.borland.com> <46c70d07$1@newsgroups.borland.com> <46c9d309@newsgroups.borland.com>
Subject: Re: Important - Need help testing new Indy version and fast!
Date: Wed, 22 Aug 2007 08:11:20 +0100
Lines: 104
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 86.132.188.37
Message-ID: <46cbe19b@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1187766683 86.132.188.37 (22 Aug 2007 00:11:23 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail