Mercurial > hg
comparison mcabber/src/jab_iq.c @ 597:96831b222903
Code cleanup
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Tue, 13 Dec 2005 22:20:23 +0100 |
parents | 6c7fd289648f |
children | 9516db839e08 |
comparison
equal
deleted
inserted
replaced
596:6c7fd289648f | 597:96831b222903 |
---|---|
142 jab_send(conn, x); | 142 jab_send(conn, x); |
143 xmlnode_free(x); | 143 xmlnode_free(x); |
144 } | 144 } |
145 } | 145 } |
146 } | 146 } |
147 | |
148 /* | |
149 if (find(jhook.agents.begin(), jhook.agents.end(), DEFAULT_CONFSERV) == jhook.agents.end()) | |
150 jhook.agents.insert(jhook.agents.begin(), agent(DEFAULT_CONFSERV, DEFAULT_CONFSERV, | |
151 _("Default Jabber conference server"), agent::atGroupchat)); | |
152 | |
153 */ | |
154 } | 147 } |
155 | 148 |
156 static void handle_iq_result(jconn conn, char *from, xmlnode xmldata) | 149 static void handle_iq_result(jconn conn, char *from, xmlnode xmldata) |
157 { | 150 { |
158 xmlnode x; | 151 xmlnode x; |
159 char *p; | 152 char *p; |
160 char *ns; | 153 char *ns; |
161 int iid; | |
162 | 154 |
163 p = xmlnode_get_attrib(xmldata, "id"); | 155 p = xmlnode_get_attrib(xmldata, "id"); |
164 if (!p) { | 156 if (!p) { |
165 scr_LogPrint(LPRINT_LOG, "IQ result stanza with no ID, ignored."); | 157 scr_LogPrint(LPRINT_LOG, "IQ result stanza with no ID, ignored."); |
166 return; | 158 return; |
167 } | 159 } |
168 | 160 |
169 iid = atoi(p); // XXX | 161 if (atoi(p) == s_id) { // Authentication XXX |
170 if (iid == s_id) { // Authentication | |
171 if (jstate == STATE_GETAUTH) { | 162 if (jstate == STATE_GETAUTH) { |
172 if ((x = xmlnode_get_tag(xmldata, "query")) != NULL) | 163 if ((x = xmlnode_get_tag(xmldata, "query")) != NULL) |
173 if (!xmlnode_get_tag(x, "digest")) { | 164 if (!xmlnode_get_tag(x, "digest")) { |
174 jc->sid = 0; | 165 jc->sid = 0; |
175 } | 166 } |