Closed GoogleCodeExporter closed 9 years ago
[deleted comment]
[deleted comment]
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:
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
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
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
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
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
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
Original comment by juberti@google.com
on 1 Jun 2013 at 4:59
Original issue reported on code.google.com by
fayya...@gmail.com
on 5 Apr 2012 at 7:54Attachments: