about Login to RetroMessenger

Old SourceForge Discussion forum that is now archived. Please use one of the other forums.

about Login to RetroMessenger

Postby mahendra » Thu Oct 16, 2008 9:06 pm

About login we need some input.
Does Retroshare Library support multiple login?

RetroShare-messenger support only 1 login.
and username can not be edited on text control(username/login).

Any suggestions?

Thanks & Regards,
Mahendra (Retromessenger Team)
mahendra
 

RE: about Login to RetroMessenger

Postby Dr Bob » Thu Oct 16, 2008 11:44 pm

Yes, Retroshare at the moment only supports default one login,
but this can be changed quite easily - either at a higher level - or at libretroshare level.
you just have to scan the directories for suitable certificates, and pass the selected one/directory to libretroshare.

it might be best if we add it to libretroshare though.... which might me slightly more work, but shouldn't be too hard.

db.
Dr Bob
 

run time error in Login

Postby mahendra » Mon Oct 20, 2008 7:47 pm

Hi,

For login i am trying to call

p3Peers* m_rsPeers;
m_rsPeers->getFriendList( peers );

But getting segmentation fault while logging-in.
Any input about it?

One more question about how to connect RM-UI to network? I didnt find any API in rsiface for connecting netwotk.

it seems most of the APIs are defined into connect manager but functions defined in class are protected so RM-UI cant use them.
Any input abou it??

Thanks & Kind Regards,
Mahendra (Retromessenge Team)
mahendra
 

RE: about Login to RetroMessenger

Postby Dr Bob » Mon Oct 20, 2008 9:34 pm

hmm,

it is segfaulting because your variable m_rsPeers is never defined... (what is it set to?)

You should use the global extern RsPeers *rsPeers;
which is defined in libretroshare/src/rsiface/rspeers.h

all the retroshare interfaces have a similar global variable which is setup
when you start up libretroshare.a

DrBob.
Dr Bob
 

RE: about Login to RetroMessenger

Postby mahendra » Tue Oct 21, 2008 9:53 am

Hello DrBob,

Thank you very much for reply.

Actually i have checked with extern RsPeers *rsPeers;

still it is segfaulting.

std::list peers;
rsPeers->getFriendList( peers );

Possible reason, variable "peers"??
But it is defined here.

any other thought or suggestions?

Regards,
Mahendra
mahendra
 

RE: about Login to RetroMessenger

Postby RJP Computing » Tue Oct 21, 2008 4:44 pm

This doesn't make sense because RsPeers is an abstract base class and I can't find an implimentation of the pure virtuals, so when we #include the header that contains extern RsPeers *rsPeers; it is not instantiated to anything but NULL and that is why it SEGFAULTS.

Where is the implimentation of the abstract base class 'RsPeers'?
--
Regards,
Ryan
RJP Computing
 

RE: about Login to RetroMessenger

Postby Dr Bob » Tue Oct 21, 2008 8:56 pm

You have to initialise libretroshare.... (see libretroshare/src/rsiface/retroshare.cc)

This creates objects which are pointed to by rsPeers, and the other interface objects.
the objects are all created in the initialisation functions (libretroshare/src/rsserver/p3face-startup.cc)

DrBob.
Dr Bob
 

RE: about Login to RetroMessenger

Postby mahendra » Wed Oct 22, 2008 11:28 am

Hello DrBob,

When we say that we have to initialize retroshare.....can you be more specific?

what steps we need to follow to initialize?
Is it just Rsinit (InitRsConfig())??

Still rsPeer is seg-faulting where ever we are using.

Nor sure what else needed to initialize?
It will be great if you can be more specific about rsPeer.

Thanks & Regards,
Mahendra
mahendra
 

RE: about Login to RetroMessenger

Postby Dr Bob » Wed Oct 22, 2008 12:34 pm

As I explained to you in another thread.... You need to run through the whole Initialisation procedure
which is outlined in libretroshare/src/rsiface/retroshare.cc

Specifically You must.
- Call InitRetroshare().
72 RsInit *config = InitRsConfig();
73 InitRetroShare(argc, argv, config);
74

- Load up your certificate.... libretroshare will not work without a valid certificate.
78
79 /* Key + Certificate are loaded into libretroshare */
80 LoadCertificates(config, false);
81

- Create the libretroshare interface objects.
86 NotifyTxt *notify = new NotifyTxt();
87 RsIface *iface = createRsIface(*notify);
88 RsControl *rsServer = createRsControl(*iface, *notify);
89
90 notify->setRsIface(iface);
91

- Startup libretroshare.a
94 rsServer -> StartupRetroShare(config);
95 CleanupRsConfig(config);



Only now will rsPeers be defined correctly.

DrBob.
Dr Bob
 

RE: about Login to RetroMessenger

Postby mahendra » Thu Oct 23, 2008 2:50 pm

Hello DrBob,

Thanks for reply!

while compiling "retroshare initialisation" code getting few vtable reference error for

NotifyTxt *notify = new NotifyTxt();

Error:RetroMessengerLoginDlg.cpp:(.text+0x98): undefined reference to `vtable for NotifyTxt'

My guess for probable reasons was "undefined virtual functions and virtual destructor"

But it seems they are defined.

what can be other possible reasons?

Thanks & Kind Regards,
Mahendra
mahendra
 

Next

Return to Developers Corner - Archive

Who is online

Users browsing this forum: No registered users and 1 guest