working on #328 (sigue sin ir via websockets)

parent 87d59c1e
...@@ -218,7 +218,8 @@ public class NetService implements Runnable, RestapiWrapper.iSilentLogin { ...@@ -218,7 +218,8 @@ public class NetService implements Runnable, RestapiWrapper.iSilentLogin {
public void synchronizeStudentAttributes() { public void synchronizeStudentAttributes() {
int id=PCBcontext.getPcbdb().getCurrentUser().get_id_stu(); int id=PCBcontext.getPcbdb().getCurrentUser().get_id_stu();
PCBcontext.getRestapiWrapper().ask("stu/" + id, new RestapiWrapper.iRestapiListener() { final String request="stu/" + id;
PCBcontext.getRestapiWrapper().ask(request, new RestapiWrapper.iRestapiListener() {
@Override @Override
public void preExecute() { public void preExecute() {
......
...@@ -30,7 +30,7 @@ public class StudentTalk implements Emitter.Listener { ...@@ -30,7 +30,7 @@ public class StudentTalk implements Emitter.Listener {
public void call(Object... args) { public void call(Object... args) {
if (PCBcontext.getPcbdb()!=null) if (PCBcontext.getPcbdb()!=null)
try { try {
JSONObject msg = ((JSONObject) args[0]).getJSONObject("student"); JSONObject msg=((JSONObject) args[0]).getJSONObject("student");
Log.d(this.getClass().getName(), "raw Received message " +msg.toString()); Log.d(this.getClass().getName(), "raw Received message " +msg.toString());
int id=msg.getInt("id"); int id=msg.getInt("id");
String username=msg.getString("username"); String username=msg.getString("username");
...@@ -52,7 +52,7 @@ public class StudentTalk implements Emitter.Listener { ...@@ -52,7 +52,7 @@ public class StudentTalk implements Emitter.Listener {
listener.change(updatedUser,license); listener.change(updatedUser,license);
} catch (JSONException e) { } catch (JSONException e) {
Log.e(this.getClass().getCanonicalName(), e.getClass().getCanonicalName() + "--" + e); Log.e(this.getClass().getCanonicalName(), e.getClass().getCanonicalName() + "--" + e+" at "+args[0].toString());
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment