comparison mcabber/src/jabglue.c @ 1397:5f91bac887ee

Minor style change
author Mikael Berthe <mikael@lilotux.net>
date Mon, 10 Dec 2007 22:15:08 +0100
parents 8f9928839a36
children 187985455020
comparison
equal deleted inserted replaced
1396:8f9928839a36 1397:5f91bac887ee
1362 return FALSE; 1362 return FALSE;
1363 1363
1364 // Walk through the storage bookmark tags 1364 // Walk through the storage bookmark tags
1365 x = xmlnode_get_firstchild(bookmarks); 1365 x = xmlnode_get_firstchild(bookmarks);
1366 for ( ; x; x = xmlnode_get_nextsibling(x)) { 1366 for ( ; x; x = xmlnode_get_nextsibling(x)) {
1367 const char *fjid; 1367 const char *p = xmlnode_get_name(x);
1368 const char *p;
1369 p = xmlnode_get_name(x);
1370 // If the node is a conference item, check the jid. 1368 // If the node is a conference item, check the jid.
1371 if (p && !strcmp(p, "conference")) { 1369 if (p && !strcmp(p, "conference")) {
1372 fjid = xmlnode_get_attrib(x, "jid"); 1370 const char *fjid = xmlnode_get_attrib(x, "jid");
1373 if (fjid && !strcasecmp(bjid, fjid)) 1371 if (fjid && !strcasecmp(bjid, fjid))
1374 return TRUE; 1372 return TRUE;
1375 } 1373 }
1376 } 1374 }
1377 return FALSE; 1375 return FALSE;
1387 return NULL; 1385 return NULL;
1388 1386
1389 // Walk through the storage bookmark tags 1387 // Walk through the storage bookmark tags
1390 x = xmlnode_get_firstchild(bookmarks); 1388 x = xmlnode_get_firstchild(bookmarks);
1391 for ( ; x; x = xmlnode_get_nextsibling(x)) { 1389 for ( ; x; x = xmlnode_get_nextsibling(x)) {
1392 const char *fjid; 1390 const char *p = xmlnode_get_name(x);
1393 const char *p;
1394 p = xmlnode_get_name(x);
1395 // If the node is a conference item, check the jid. 1391 // If the node is a conference item, check the jid.
1396 if (p && !strcmp(p, "conference")) { 1392 if (p && !strcmp(p, "conference")) {
1397 fjid = xmlnode_get_attrib(x, "jid"); 1393 const char *fjid = xmlnode_get_attrib(x, "jid");
1398 if (fjid && !strcasecmp(bjid, fjid)) 1394 if (fjid && !strcasecmp(bjid, fjid))
1399 return xmlnode_get_tag_data(x, "nick"); 1395 return xmlnode_get_tag_data(x, "nick");
1400 } 1396 }
1401 } 1397 }
1402 return NULL; 1398 return NULL;
1416 return NULL; 1412 return NULL;
1417 1413
1418 // Walk through the storage bookmark tags 1414 // Walk through the storage bookmark tags
1419 x = xmlnode_get_firstchild(bookmarks); 1415 x = xmlnode_get_firstchild(bookmarks);
1420 for ( ; x; x = xmlnode_get_nextsibling(x)) { 1416 for ( ; x; x = xmlnode_get_nextsibling(x)) {
1421 const char *fjid; 1417 const char *p = xmlnode_get_name(x);
1422 const char *p;
1423 p = xmlnode_get_name(x);
1424 // If the node is a conference item, let's add the note to our list. 1418 // If the node is a conference item, let's add the note to our list.
1425 if (p && !strcmp(p, "conference")) { 1419 if (p && !strcmp(p, "conference")) {
1426 fjid = xmlnode_get_attrib(x, "jid"); 1420 const char *fjid = xmlnode_get_attrib(x, "jid");
1427 if (!fjid) 1421 if (!fjid)
1428 continue; 1422 continue;
1429 sl_bookmarks = g_slist_append(sl_bookmarks, (char*)fjid); 1423 sl_bookmarks = g_slist_append(sl_bookmarks, (char*)fjid);
1430 } 1424 }
1431 } 1425 }
1455 } 1449 }
1456 1450
1457 // Walk through the storage tags 1451 // Walk through the storage tags
1458 x = xmlnode_get_firstchild(bookmarks); 1452 x = xmlnode_get_firstchild(bookmarks);
1459 for ( ; x; x = xmlnode_get_nextsibling(x)) { 1453 for ( ; x; x = xmlnode_get_nextsibling(x)) {
1460 const char *fjid; 1454 const char *p = xmlnode_get_name(x);
1461 const char *p;
1462 p = xmlnode_get_name(x);
1463 // If the current node is a conference item, see if we have to replace it. 1455 // If the current node is a conference item, see if we have to replace it.
1464 if (p && !strcmp(p, "conference")) { 1456 if (p && !strcmp(p, "conference")) {
1465 fjid = xmlnode_get_attrib(x, "jid"); 1457 const char *fjid = xmlnode_get_attrib(x, "jid");
1466 if (!fjid) 1458 if (!fjid)
1467 continue; 1459 continue;
1468 if (!strcmp(fjid, roomid)) { 1460 if (!strcmp(fjid, roomid)) {
1469 // We've found a bookmark for this room. Let's hide it and we'll 1461 // We've found a bookmark for this room. Let's hide it and we'll
1470 // create a new one. 1462 // create a new one.
1608 } 1600 }
1609 1601
1610 // Walk through the storage tags 1602 // Walk through the storage tags
1611 x = xmlnode_get_firstchild(rosternotes); 1603 x = xmlnode_get_firstchild(rosternotes);
1612 for ( ; x; x = xmlnode_get_nextsibling(x)) { 1604 for ( ; x; x = xmlnode_get_nextsibling(x)) {
1613 const char *fjid; 1605 const char *p = xmlnode_get_name(x);
1614 const char *p;
1615 p = xmlnode_get_name(x);
1616 // If the current node is a conference item, see if we have to replace it. 1606 // If the current node is a conference item, see if we have to replace it.
1617 if (p && !strcmp(p, "note")) { 1607 if (p && !strcmp(p, "note")) {
1618 fjid = xmlnode_get_attrib(x, "jid"); 1608 const char *fjid = xmlnode_get_attrib(x, "jid");
1619 if (!fjid) 1609 if (!fjid)
1620 continue; 1610 continue;
1621 if (!strcmp(fjid, barejid)) { 1611 if (!strcmp(fjid, barejid)) {
1622 // We've found a note for this jid. Let's hide it and we'll 1612 // We've found a note for this jid. Let's hide it and we'll
1623 // create a new one. 1613 // create a new one.