Mercurial > pidgin
comparison libgaim/protocols/oscar/oscar.c @ 15283:c2f15e2117dc
[gaim-migrate @ 18073]
gaim_xfer_new() can return NULL via g_return_if_fail(). It should therefore not be assumed that it returns a GaimXfer; check against its return value before proceeding when creating a GaimXfer.
committer: Tailor Script <tailor@pidgin.im>
author | Evan Schoenberg <evan.s@dreskin.net> |
---|---|
date | Thu, 04 Jan 2007 23:20:12 +0000 |
parents | 2e3ffe29f9ae |
children | e5c75076c6d1 |
comparison
equal
deleted
inserted
replaced
15282:8e39ca9b954a | 15283:c2f15e2117dc |
---|---|
6306 | 6306 |
6307 od = gc->proto_data; | 6307 od = gc->proto_data; |
6308 account = gaim_connection_get_account(gc); | 6308 account = gaim_connection_get_account(gc); |
6309 | 6309 |
6310 xfer = gaim_xfer_new(account, GAIM_XFER_SEND, who); | 6310 xfer = gaim_xfer_new(account, GAIM_XFER_SEND, who); |
6311 gaim_xfer_ref(xfer); | 6311 if (xfer) |
6312 gaim_xfer_set_init_fnc(xfer, peer_oft_sendcb_init); | 6312 { |
6313 gaim_xfer_set_cancel_send_fnc(xfer, peer_oft_cb_generic_cancel); | 6313 gaim_xfer_ref(xfer); |
6314 gaim_xfer_set_request_denied_fnc(xfer, peer_oft_cb_generic_cancel); | 6314 gaim_xfer_set_init_fnc(xfer, peer_oft_sendcb_init); |
6315 gaim_xfer_set_ack_fnc(xfer, peer_oft_sendcb_ack); | 6315 gaim_xfer_set_cancel_send_fnc(xfer, peer_oft_cb_generic_cancel); |
6316 | 6316 gaim_xfer_set_request_denied_fnc(xfer, peer_oft_cb_generic_cancel); |
6317 conn = peer_connection_new(od, OSCAR_CAPABILITY_SENDFILE, who); | 6317 gaim_xfer_set_ack_fnc(xfer, peer_oft_sendcb_ack); |
6318 conn->flags |= PEER_CONNECTION_FLAG_INITIATED_BY_ME; | 6318 |
6319 conn->flags |= PEER_CONNECTION_FLAG_APPROVED; | 6319 conn = peer_connection_new(od, OSCAR_CAPABILITY_SENDFILE, who); |
6320 aim_icbm_makecookie(conn->cookie); | 6320 conn->flags |= PEER_CONNECTION_FLAG_INITIATED_BY_ME; |
6321 conn->xfer = xfer; | 6321 conn->flags |= PEER_CONNECTION_FLAG_APPROVED; |
6322 xfer->data = conn; | 6322 aim_icbm_makecookie(conn->cookie); |
6323 conn->xfer = xfer; | |
6324 xfer->data = conn; | |
6325 } | |
6323 | 6326 |
6324 return xfer; | 6327 return xfer; |
6325 } | 6328 } |
6326 | 6329 |
6327 /* | 6330 /* |