vfa-kinnd / libjingle

Automatically exported from code.google.com/p/libjingle
0 stars 0 forks source link

Fail running pcp app in libjingle 0.6.13 #334

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. The goal of my work is to be able to build p2p nodes streaming video to each 
other. I started with pcp (file transfer app).

Using guide line from a previous question i.e.
http://code.google.com/p/libjingle/issues/detail?id=320

I modified libjingle.scons and was able to successfully build pcp app.

Now i am trying to transfer a .txt file between two instances of pcp on the 
same machine (I know the same binary can be used but from different locations 
as advised in the documentation).

2. First i started a file receiver / listener. Logs are attached as receiver 
file. It logged in successfully and was listening for incoming connections.

i.e. $ ./pcp jinglelib@gmail.com 

3. Second i tried a instance of pcp to send a file. It gets through 
successfully to the login stage but latter fails to establish a p2p connection. 
This is as much as i could gather.

i.e. $ ./libjingle-0.6.13/talk/build/dbg/staging/pcp jinglelib@gmail.com 
fayyaztestfile.txt jinglelib@gmail.com:jingle_out.txt

I have tried this using two different gmail id's as well. But it doesn't make 
any difference.

What is the expected output? What do you see instead?

The file should be transferred successfully. However, it fails to establish a 
p2p connection though google xmpp server authentication is successful. Finally 
the sender logs out.

What version of the product are you using? On what operating system?

libjingle 0.6.13 on Fedora 14 64 bit machine.

Please provide any additional information below.

I know that pcp has been discontinued since 0.4. However, i have tried 
extensively to build older versions of libjingle without any success. 0.6 was 
the only one in which after going through many issues, i was able to build and 
run.

Any help in this regard would be really appreciated.

Thanks,
Fayyaz

Original issue reported on code.google.com by fayya...@gmail.com on 5 Apr 2012 at 7:54

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I call funtion login of pcp frome JNI wrapper(c++) in MainActivity(Java) 
->login success.
But when I call it again in MainActivity(Java).It can't login again.
Attach is code MainActivity.
Any suggest?Thanks very much!!

Original comment by thaitam....@gmail.com on 24 Oct 2012 at 11:04

Attachments:

GoogleCodeExporter commented 9 years ago
Do you have a debug log? If not, could you generate one? It would be very 
helpful to see what is going on/happening from the first log-in to after the 
second.

Original comment by Cummings.Kyle.M on 24 Oct 2012 at 2:22

GoogleCodeExporter commented 9 years ago
I had saw logcat in Java and I saw in the second login, it stop when run into 
command line:
#    pump.DoLogin(LoginSettings(), new XmppSocket(gXmppUseTls), 0);    #
And in DoLogin it run & stop at "client_->Connect(xcs, "", socket, auth);":
#    void XmppPump::DoLogin(const buzz::XmppClientSettings & xcs,
                       buzz::AsyncSocket* socket,
                       buzz::PreXmppAuth* auth) {
    LOGD("DoLogin 1111");
  OnStateChange(buzz::XmppEngine::STATE_START);
  //if (!AllChildrenDone()) {
  LOGD("DoLogin 2222");
    client_->SignalStateChange.connect(this, &XmppPump::OnStateChange);
    LOGD("DoLogin 333");
    client_->Connect(xcs, "", socket, auth);
    LOGD("DoLogin 4444");
    client_->Start();
    LOGD("DoLogin 5555");
  //}
}
#
I guess the problem is "xcs"(settinglogin) .And the second login, Do need load 
shared library again? Because Java not allow load more one times the same 
library.
Thanks!

Original comment by thaitam....@gmail.com on 24 Oct 2012 at 4:26

GoogleCodeExporter commented 9 years ago
Are you trying to log-in again on the same device? Also, are you logging-in to 
Google? Or your own XMPP server? 

I suspect that it might be that the server is denying your second log-in 
attempt due to a resource conflict. So, if you are running a personal XMPP 
server, and it does not allow for user's to have multiple log-ins with the same 
resource, you will have to log-out first or somehow change the resource for the 
second log-in attempt. However, Google's servers should handle this as they 
append a random 6-8 character string to every requested resource bind. If you 
are connected to Google's servers, then I wouldn't be able to help much more 
without more information about your code (for example: What are you doing 
between log-in attempts?).

Original comment by Cummings.Kyle.M on 25 Oct 2012 at 2:41

GoogleCodeExporter commented 9 years ago
Thanks very much.
After the first log-in,I send file to Ubuntu running pcp example & log-out when 
success send file.Then, I log-in again.I think the same you,maybe have due to a 
resource conflict.("xcs" settting : gSrcJid ,soket, ip,.............).It can't 
success at second log-in. I think i logging to Google.

Original comment by thaitam....@gmail.com on 25 Oct 2012 at 3:20

GoogleCodeExporter commented 9 years ago
If you are logging-out, then there definitely is no resource conflict 
occurring. 

I am looking at your JAVA code that you posted. I have to admit that I am not 
that very well versed in JAVA, especially anything Android/JNI. That being 
said, the only thing that I can think of that might be happening is that since 
the second log-in is being done in a new thread, it might be happening while 
the first PCP is still running. Are you sure that the second PCP is being done 
after the first one is completed? I have seen before that JNI code can run 
along side other and appear to run before or after some other JNI code segment 
in the logcat debug.

Original comment by Cummings.Kyle.M on 25 Oct 2012 at 5:10

GoogleCodeExporter commented 9 years ago
I sure that the second PCP is being done after the first one is 
completed.because after log-in first complete,I press refresh button for the 
second log-in start.

Original comment by thaitam....@gmail.com on 25 Oct 2012 at 5:38

GoogleCodeExporter commented 9 years ago

Original comment by juberti@google.com on 1 Jun 2013 at 4:59