[7415] in testers

home help back first fref pref prev next nref lref last post

jwgc and 'presence'; jctl show doesn't work

daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Fri Mar 17 12:43:01 2006

Message-Id: <200603171742.k2HHgpAG024392@infinite-loop.mit.edu>
To: testers@MIT.EDU
Reply-To: Jonathan Reed <jdreed@MIT.EDU>
Date: Fri, 17 Mar 2006 12:42:51 -0500
From: Jonathan D Reed <jdreed@MIT.EDU>



I'm having some trouble with finding a way to tell people I'm "away"
in jwgc.  Here's an example: (the "athena%" prompt indicates my test
account, the infinite-loop% prompt is me Both accounts are in
each others contact lists.)

athena% jlocate
0 contacts found.

infinite-loop:~%jwgc

athena% jlocate
jdreed@mit.edu                                    jwgc            available

infinite-loop:~%jctl set presence away
Variable successfully set.

-Test account gets a windowgram: jdreed@mit.edu/jwgc is available\nStatus: away
-But...
athena% jlocate
jdreed@mit.edu                                    jwgc            available

infinite-loop:~%jctl set presence normal
Variable successfully set.

-Test account gets a windowgram: jdreed@mit.edu/jwgc is away\nStatus: normal
-But...
athena% jlocate
jdreed@mit.edu                                    jwgc            away

infinite-loop:~%jctl set presence away
Variable successfully set.

-Test account gets a windowgram: jdreed@mit.edu/jwgc is normal\nStatus: away
-But...

athena% jlocate
jdreed@mit.edu                                    jwgc            normal


So it appears that setting the presence results in a windowgram with
the presence in the "Status" line, but the actual presence doesn't
change until a second "jctl set presence" command is issued.  The once
exception is "available", which takes effect immediately.  Maybe I'm
misunderstanding how this is supposed to work, but it's confusing at
best.  

Also, jctl show doesn't work

infinite-loop:~%jctl show presence
Unknown response from server.

It appears to be due to jctl not understanding a "results" packet from
the server, this patch makes it work but could probably format the
output better, maybe an additional "else if" clause specifically for
the "results" packets would be nicer.

------------------------------CUT HERE------------------------------
--- jwgc/clients/jctl/jctl.c    2006-03-10 10:32:47.000000000 -0500
+++ jwgc-patched/clients/jctl/jctl.c    2006-03-17 12:31:43.847382603 -0500
@@ -125,7 +125,8 @@
                        return;
                }
        }
-       else if (!strcmp(xode_get_name(x), "success")) {
+       else if ((!strcmp(xode_get_name(x), "success")) || 
+                 (!strcmp(xode_get_name(x), "results"))) {
                printf("%s\n", cdata);
                return;
        }
------------------------------CUT HERE------------------------------

However, so far, jwgc appears to be my preferred Jabber client, so
I'll likely be testing it some more and will send along any additional
feedback.


-Jon


--------
Jonathan Reed
jdreed@mit.edu

home help back first fref pref prev next nref lref last post