Mercurial > pidgin
diff src/protocols/novell/nmrequest.c @ 9360:d77537e8bfe5
[gaim-migrate @ 10168]
" This patch fixes contact list sync problem, fixes a
memory leak, and includes some code cleanup." --Mike Stoddard of Novell
committer: Tailor Script <tailor@pidgin.im>
| author | Luke Schierer <lschiere@pidgin.im> |
|---|---|
| date | Wed, 23 Jun 2004 17:27:56 +0000 |
| parents | 6663ad2386d9 |
| children |
line wrap: on
line diff
--- a/src/protocols/novell/nmrequest.c Wed Jun 23 16:58:22 2004 +0000 +++ b/src/protocols/novell/nmrequest.c Wed Jun 23 17:27:56 2004 +0000 @@ -20,6 +20,8 @@ #include "nmrequest.h" +static int count = 0; + struct _NMRequest { int trans_id; @@ -32,9 +34,8 @@ NMERR_T ret_code; }; - -NMRequest * -nm_create_request(const char *cmd, int trans_id, int gmt) +NMRequest *nm_create_request(const char *cmd, int trans_id, int gmt, nm_response_cb cb, + gpointer resp_data, gpointer user_define) { NMRequest *req; @@ -45,8 +46,13 @@ req->cmd = g_strdup(cmd); req->trans_id = trans_id; req->gmt = gmt; + req->callback = cb; + req->data = resp_data; + req->user_define = user_define; req->ref_count = 1; + gaim_debug_info("novell", "Creating NMRequest instance, total=%d\n", ++count); + return req; } @@ -57,7 +63,11 @@ if (req->cmd) g_free(req->cmd); g_free(req); + + gaim_debug_info("novell", + "Releasing NMRequest instance, total=%d\n", --count); } + } void
