nel-all
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nel] Newbie problem - Once again!


From: Patrick Herrmann
Subject: Re: [Nel] Newbie problem - Once again!
Date: Thu, 4 Oct 2001 12:11:49 -0400

Hi,

Right, I forgot to start all needed services from nelns. So I launched:
        the naming_service
        the time_service
        the log_service
        the login_service
        the admin_executor_service
        the admin_service
        the welcome_service
All services told me they are ready. Then I started my personnal service, 
and...
        "INF32165 service.cpp 363 : Starting Service 'KGE' using NeL (Oct  4 
2001 
10:54:12)
        Segmentation fault"

I checked the log.log file, but it was still empty.

I noticed that the pacs_service is not included within the global Makefile. I 
added it, but I got some errros when compiling. Anyway, right now, although I 
started all possible services, I am not able to start the one I coded.

Patrick

P.S.: Ouaou, I wondered myself how I could write the "cout" line of code! 
Thanks to point it out. It didn't solve the problem.

On Thursday 04 October 2001 04:49 am, you wrote:
> Hello,
>
> You should take a look into the log.log file or to the stdout log because
> the reason should be explain. I tried your service and it started without
> problem.
> The first problem could be that you don't create the kge_config.cfg with
> the 2 variables that say where the naming service is. Copy the
> time_service.cfg for example, and remove only the UniTime variable.
> Another posibility is that you didn't launch the admin_executor_service,
> naming_service and time_service before running your service so it could not
> find these standard services.
> But without any log, I can't say exactly what is your problem.
>
> You have writtent that in your service:
> > cout << "KGE_1.0 | Processing connection | Message: %s\n",
>
> message.toString();
> I never see a so strange this things, you try to mix up cout and printf
> string format in the same line, I really don't tink that it could work
> fine, you should put:
>    cout << "KGE_1.0 | Processing connection | Message: " <<
> message.toString() << endl;
> or
>    printf  ("KGE_1.0 | Processing connection | Message: %s\n",
> message.toString().c_str()); /* don't format the c_str() to convert stl
> string to char* */
>
> Vianney Lecroart
> ---
> lead network programmer / nevrax.com
> icq#: 6870415
> homepage: http://ace.planet-d.net
> www.geekcode.com: GCS/E d- s+++: a-- C+++$ UL++ P- L+++>+$ E+>- W++ N+ o?
> K- w++$ O- M- V- PS- PE? Y PGP t 5? X+ R- tv++ b- DI D+ G e++ h+ r-- y?
>
> ----- Original Message -----
> From: "Patrick Herrmann" <address@hidden>
> To: <address@hidden>
> Sent: Thursday, October 04, 2001 1:40 AM
> Subject: [Nel] Newbie problem - Once again!
>
> > Hi,
> >
> > The following code is compiling and linking very well, but when launching
>
> the
>
> > generated application (executable), I get a "segmentation fault" error.
> >
> > I figured out that it was the call to the function NLNET_SERVICE_MAIN
> > that causes the error.
> >
> > I'm working on a Mandrake platform, using g++ compiler.
> >
> > Thanks for your answer,
> >
> > Patrick
> >
> > #include "nel/net/service.h" // Declaration of the IService interface
> > #include "nel/net/message.h" // Declaration of the CMessage class
> > #include "nel/net/buf_server.h" // Declaration of type TSockId
> > #include "nel/net/callback_net_base.h" // Declaration of the
>
> CCallbackNetBase
>
> > class and type TCallbackItem
> >
> > using namespace NLNET;
> >
> > void cbProcessConnection(CMessage& message, TSockId from,
>
> CCallbackNetBase&
>
> > nb)
> > {
> >         cout << "KGE_1.0 | Processing connection | Message: %s\n",
> > message.toString();
> > }
> >
> > void cbProcessReceivedMsg(CMessage& message, TSockId from,
>
> CCallbackNetBase&
>
> > nb)
> > {
> >         cout << "KGE_1.0 | Processing message | Message: %s\n",
> > message.toString();
> > }
> >
> > TCallbackItem KGECallbackArray[] =
> > {
> >         { "MSG", cbProcessReceivedMsg },
> >         { "NEW", cbProcessConnection }
> > };
> >
> > NLNET_SERVICE_MAIN (IService, "KGE", "kge_service", 0, KGECallbackArray);
> > _______________________________________________
> > Nel mailing list
> > address@hidden
> > http://www.nevrax.org/mailman/listinfo.cgi/nel
>
> _______________________________________________
> Nel mailing list
> address@hidden
> http://www.nevrax.org/mailman/listinfo.cgi/nel


reply via email to

[Prev in Thread] Current Thread [Next in Thread]