comparison src/account.c @ 11076:75be3005640e

[gaim-migrate @ 13086] I'd left off a null and it caused a crash. Also, I changed the thing to use vargs, since it will need to use that in the future anyway, I think. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 09 Jul 2005 20:00:07 +0000
parents 812b285aeccd
children 1c5398ccbeb0
comparison
equal deleted inserted replaced
11075:812b285aeccd 11076:75be3005640e
405 const char *data; 405 const char *data;
406 const char *type; 406 const char *type;
407 407
408 /* Get the active/inactive state */ 408 /* Get the active/inactive state */
409 data = xmlnode_get_attrib(node, "active"); 409 data = xmlnode_get_attrib(node, "active");
410 if (data != NULL) 410 if (data == NULL)
411 { 411 return;
412 if (strcasecmp(data, "true") == 0) 412 if (strcasecmp(data, "true") == 0)
413 active = TRUE; 413 active = TRUE;
414 else if (strcasecmp(data, "false") == 0) 414 else if (strcasecmp(data, "false") == 0)
415 active = FALSE; 415 active = FALSE;
416 else
417 return;
418 }
419 else 416 else
420 return; 417 return;
421 418
422 /* Get the type of the status */ 419 /* Get the type of the status */
423 type = xmlnode_get_attrib(node, "type"); 420 type = xmlnode_get_attrib(node, "type");
425 return; 422 return;
426 423
427 /* QQQ: Need to read attributes into a vargs */ 424 /* QQQ: Need to read attributes into a vargs */
428 425
429 /* QQQ: This needs to do a better job of adding attributes and stuff */ 426 /* QQQ: This needs to do a better job of adding attributes and stuff */
430 /* Use gaim_account_set_status_vargs(); */ 427 gaim_account_set_status_vargs(account, type, active, NULL);
431 gaim_account_set_status(account, type, active);
432 } 428 }
433 429
434 static void 430 static void
435 parse_statuses(xmlnode *node, GaimAccount *account) 431 parse_statuses(xmlnode *node, GaimAccount *account)
436 { 432 {