libpurple/protocols/jabber/adhoccommands.c

branch
string-comparison-r2
changeset 38258
9a6551eba09c
parent 31096
442e7d4f6cc7
child 38259
c593fc9f5438
equal deleted inserted replaced
38257:1a294a6d2a57 38258:9a6551eba09c
167 } 167 }
168 168
169 if(!status) 169 if(!status)
170 return; 170 return;
171 171
172 if(!strcmp(status,"completed")) { 172 if(purple_strequal(status,"completed")) {
173 /* display result */ 173 /* display result */
174 xmlnode *note = xmlnode_get_child(command,"note"); 174 xmlnode *note = xmlnode_get_child(command,"note");
175 175
176 if(note) { 176 if(note) {
177 char *data = xmlnode_get_data(note); 177 char *data = xmlnode_get_data(note);
181 181
182 if(xdata) 182 if(xdata)
183 jabber_x_data_request(js, xdata, (jabber_x_data_cb)do_adhoc_ignoreme, NULL); 183 jabber_x_data_request(js, xdata, (jabber_x_data_cb)do_adhoc_ignoreme, NULL);
184 return; 184 return;
185 } 185 }
186 if(!strcmp(status,"executing")) { 186 if(purple_strequal(status,"executing")) {
187 /* this command needs more steps */ 187 /* this command needs more steps */
188 xmlnode *actions, *action; 188 xmlnode *actions, *action;
189 int actionindex = 0; 189 int actionindex = 0;
190 GList *actionslist = NULL; 190 GList *actionslist = NULL;
191 JabberAdHocActionInfo *actionInfo; 191 JabberAdHocActionInfo *actionInfo;
205 if(action->type == XMLNODE_TYPE_TAG) { 205 if(action->type == XMLNODE_TYPE_TAG) {
206 JabberXDataAction *newaction = g_new0(JabberXDataAction, 1); 206 JabberXDataAction *newaction = g_new0(JabberXDataAction, 1);
207 newaction->name = g_strdup(_(action->name)); 207 newaction->name = g_strdup(_(action->name));
208 newaction->handle = g_strdup(action->name); 208 newaction->handle = g_strdup(action->name);
209 actionslist = g_list_append(actionslist, newaction); 209 actionslist = g_list_append(actionslist, newaction);
210 if(defaultactionhandle && !strcmp(defaultactionhandle, action->name)) 210 if(defaultactionhandle && purple_strequal(defaultactionhandle, action->name))
211 actionindex = index; 211 actionindex = index;
212 } 212 }
213 } 213 }
214 } 214 }
215 215

mercurial