Mercurial > pidgin.yaz
comparison src/protocols/novell/nmuser.c @ 8782:5a2b5e4abf3a
[gaim-migrate @ 9544]
Compiles again with gcc 2.96. Patch by Ignacio J. Elia.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Fri, 23 Apr 2004 23:10:10 +0000 |
parents | 0f73e8204529 |
children | a2affcdf8e01 |
comparison
equal
deleted
inserted
replaced
8781:d3c0203d4961 | 8782:5a2b5e4abf3a |
---|---|
48 | 48 |
49 NMUser * | 49 NMUser * |
50 nm_initialize_user(const char *name, const char *server_addr, | 50 nm_initialize_user(const char *name, const char *server_addr, |
51 int port, gpointer data, nm_event_cb event_callback) | 51 int port, gpointer data, nm_event_cb event_callback) |
52 { | 52 { |
53 NMUser *user; | |
53 if (name == NULL || server_addr == NULL || event_callback == NULL) | 54 if (name == NULL || server_addr == NULL || event_callback == NULL) |
54 return NULL; | 55 return NULL; |
55 | 56 |
56 NMUser *user = g_new0(NMUser, 1); | 57 user = g_new0(NMUser, 1); |
57 | 58 |
58 user->conn = g_new0(NMConn, 1); | 59 user->conn = g_new0(NMConn, 1); |
59 | 60 |
60 user->contacts = | 61 user->contacts = |
61 g_hash_table_new_full(g_str_hash, nm_utf8_str_equal, | 62 g_hash_table_new_full(g_str_hash, nm_utf8_str_equal, |
1645 | 1646 |
1646 char * | 1647 char * |
1647 nm_typed_to_dotted(const char *typed) | 1648 nm_typed_to_dotted(const char *typed) |
1648 { | 1649 { |
1649 unsigned i = 0, j = 0; | 1650 unsigned i = 0, j = 0; |
1651 char *dotted; | |
1650 | 1652 |
1651 if (typed == NULL) | 1653 if (typed == NULL) |
1652 return NULL; | 1654 return NULL; |
1653 | 1655 |
1654 char *dotted = g_new0(char, strlen(typed)); | 1656 dotted = g_new0(char, strlen(typed)); |
1655 | 1657 |
1656 do { | 1658 do { |
1657 | 1659 |
1658 /* replace comma with a dot */ | 1660 /* replace comma with a dot */ |
1659 if (j != 0) { | 1661 if (j != 0) { |
1690 { | 1692 { |
1691 NMField *list, *cursor, *locate; | 1693 NMField *list, *cursor, *locate; |
1692 gint objid1; | 1694 gint objid1; |
1693 NMContact *contact; | 1695 NMContact *contact; |
1694 NMFolder *folder; | 1696 NMFolder *folder; |
1697 gpointer item; | |
1695 | 1698 |
1696 if (user == NULL || fields == NULL) | 1699 if (user == NULL || fields == NULL) |
1697 return; | 1700 return; |
1698 | 1701 |
1699 /* Is it wrapped in a RESULTS array? */ | 1702 /* Is it wrapped in a RESULTS array? */ |
1711 | 1714 |
1712 locate = | 1715 locate = |
1713 nm_locate_field(NM_A_SZ_OBJECT_ID, (NMField *) cursor->value); | 1716 nm_locate_field(NM_A_SZ_OBJECT_ID, (NMField *) cursor->value); |
1714 if (locate != NULL && locate->value != 0) { | 1717 if (locate != NULL && locate->value != 0) { |
1715 objid1 = atoi((char *) locate->value); | 1718 objid1 = atoi((char *) locate->value); |
1716 gpointer item = | 1719 item = |
1717 nm_folder_find_item_by_object_id(user->root_folder, objid1); | 1720 nm_folder_find_item_by_object_id(user->root_folder, objid1); |
1718 if (item != NULL) { | 1721 if (item != NULL) { |
1719 if (cursor->method == NMFIELD_METHOD_ADD) { | 1722 if (cursor->method == NMFIELD_METHOD_ADD) { |
1720 if (g_ascii_strcasecmp(cursor->tag, NM_A_FA_CONTACT) == 0) { | 1723 if (g_ascii_strcasecmp(cursor->tag, NM_A_FA_CONTACT) == 0) { |
1721 contact = (NMContact *) item; | 1724 contact = (NMContact *) item; |