comparison pidgin/gtksession.c @ 21284:6de09629f091

propagate from branch 'im.pidgin.pidgin.next.minor' (head 0c9637482b845cc65e95a26e144697391c51133f) to branch 'im.pidgin.pidgin' (head e3a6991e78dac328f13804950fee54dfb8afc3c5)
author Ka-Hing Cheung <khc@hxbc.us>
date Sat, 10 Nov 2007 04:52:20 +0000
parents c103b0ea456f
children c38d72677c8a
comparison
equal deleted inserted replaced
21283:406aa3be6b32 21284:6de09629f091
80 Bool opening, IcePointer *watch_data) { 80 Bool opening, IcePointer *watch_data) {
81 struct ice_connection_info *conninfo = NULL; 81 struct ice_connection_info *conninfo = NULL;
82 82
83 if (opening) { 83 if (opening) {
84 purple_debug(PURPLE_DEBUG_INFO, "Session Management", 84 purple_debug(PURPLE_DEBUG_INFO, "Session Management",
85 "Handling new ICE connection... "); 85 "Handling new ICE connection... \n");
86 86
87 /* ensure ICE connection is not passed to child processes */ 87 /* ensure ICE connection is not passed to child processes */
88 fcntl(IceConnectionNumber(connection), F_SETFD, FD_CLOEXEC); 88 fcntl(IceConnectionNumber(connection), F_SETFD, FD_CLOEXEC);
89 89
90 conninfo = g_new(struct ice_connection_info, 1); 90 conninfo = g_new(struct ice_connection_info, 1);
94 conninfo->input_id = purple_input_add(IceConnectionNumber(connection), PURPLE_INPUT_READ, 94 conninfo->input_id = purple_input_add(IceConnectionNumber(connection), PURPLE_INPUT_READ,
95 ice_process_messages, conninfo); 95 ice_process_messages, conninfo);
96 *watch_data = conninfo; 96 *watch_data = conninfo;
97 } else { 97 } else {
98 purple_debug(PURPLE_DEBUG_INFO, "Session Management", 98 purple_debug(PURPLE_DEBUG_INFO, "Session Management",
99 "Handling closed ICE connection... "); 99 "Handling closed ICE connection... \n");
100 100
101 /* get the input ID back and stop watching it */ 101 /* get the input ID back and stop watching it */
102 conninfo = (struct ice_connection_info*) *watch_data; 102 conninfo = (struct ice_connection_info*) *watch_data;
103 purple_input_remove(conninfo->input_id); 103 purple_input_remove(conninfo->input_id);
104 g_free(conninfo); 104 g_free(conninfo);