two minor runtime errors

This commit is contained in:
psyc://loupsycedyglgamf.onion/~lynX 2018-05-23 15:20:50 +02:00
parent 2e459558f5
commit 95fbeacb35
2 changed files with 5 additions and 4 deletions

View File

@ -672,12 +672,13 @@ iq(XMLNode node) {
case "jabber:iq:roster":
switch(node["@type"]) {
case "get":
// TODO: this assumes that to is unset and the query is
// to itself
// TODO: this assumes that 'to' is unset and the query is
// to itself. we sometimes get here without a valid tag -
// what should we do then?
hasroster = 1;
packet = sprintf("<iq type='result' to='%s' id='%s'>"
"<query xmlns='jabber:iq:roster'>",
myjid, tag);
myjid, stringp(tag)? tag: "");
// TODO: listAcq does the same basically
foreach (friend : ppl) {
mixed *u;

View File

@ -1777,7 +1777,7 @@ quit(immediate, variant) {
int stayinalive = 0;
// so, SUBSCRIBE_PERMANENT won't work for now.
if (sizeof(v("subscriptions")) && widthof(v("subscriptions"))) {
if (mappingp(v("subscriptions")) && sizeof(v("subscriptions")) && widthof(v("subscriptions"))) {
foreach (o, s : places) {
P3(("Stay in %O, %O?\n", o, s))
if (v("subscriptions")[lower_case(s)] != SUBSCRIBE_PERMANENT)