Mercurial > pidgin
comparison src/protocols/oscar/ft.c @ 10267:9cafe038c95e
[gaim-migrate @ 11413]
This is some white-space cleanup for oscar, and send an empty channel 4
FLAP when disconnecting. This would have hopefully fixed the problem
Luke was seeing where his AIM account wasn't being signed offline for
a few hours.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Fri, 26 Nov 2004 03:52:00 +0000 |
parents | 6f2a90c36ee2 |
children | 361c9170d8af |
comparison
equal
deleted
inserted
replaced
10266:2a9ec10e0c4c | 10267:9cafe038c95e |
---|---|
194 if ((acceptfd = accept(cur->fd, &addr, &addrlen)) == -1) | 194 if ((acceptfd = accept(cur->fd, &addr, &addrlen)) == -1) |
195 return 0; /* not an error */ | 195 return 0; /* not an error */ |
196 | 196 |
197 if ((addr.sa_family != PF_INET) && (addr.sa_family != PF_INET6)) { | 197 if ((addr.sa_family != PF_INET) && (addr.sa_family != PF_INET6)) { |
198 close(acceptfd); | 198 close(acceptfd); |
199 aim_conn_close(cur); | 199 aim_conn_close(sess, cur); |
200 return -1; | 200 return -1; |
201 } | 201 } |
202 | 202 |
203 strncpy(ip, inet_ntoa(((struct sockaddr_in *)&addr)->sin_addr), sizeof(ip)); | 203 strncpy(ip, inet_ntoa(((struct sockaddr_in *)&addr)->sin_addr), sizeof(ip)); |
204 port = ntohs(((struct sockaddr_in *)&addr)->sin_port); | 204 port = ntohs(((struct sockaddr_in *)&addr)->sin_port); |
205 | 205 |
206 if (!(newconn = aim_cloneconn(sess, cur))) { | 206 if (!(newconn = aim_cloneconn(sess, cur))) { |
207 close(acceptfd); | 207 close(acceptfd); |
208 aim_conn_close(cur); | 208 aim_conn_close(sess, cur); |
209 return -ENOMEM; | 209 return -ENOMEM; |
210 } | 210 } |
211 | 211 |
212 newconn->type = AIM_CONN_TYPE_RENDEZVOUS; | 212 newconn->type = AIM_CONN_TYPE_RENDEZVOUS; |
213 newconn->fd = acceptfd; | 213 newconn->fd = acceptfd; |
230 if ((userfunc = aim_callhandler(sess, newconn, AIM_CB_FAM_OFT, AIM_CB_OFT_ESTABLISHED))) | 230 if ((userfunc = aim_callhandler(sess, newconn, AIM_CB_FAM_OFT, AIM_CB_OFT_ESTABLISHED))) |
231 ret = userfunc(sess, NULL, newconn, cur); | 231 ret = userfunc(sess, NULL, newconn, cur); |
232 | 232 |
233 } else { | 233 } else { |
234 faimdprintf(sess, 1,"Got a connection on a listener that's not rendezvous. Closing connection.\n"); | 234 faimdprintf(sess, 1,"Got a connection on a listener that's not rendezvous. Closing connection.\n"); |
235 aim_conn_close(newconn); | 235 aim_conn_close(sess, newconn); |
236 ret = -1; | 236 ret = -1; |
237 } | 237 } |
238 | 238 |
239 return ret; | 239 return ret; |
240 } | 240 } |
930 | 930 |
931 free(header); | 931 free(header); |
932 } | 932 } |
933 | 933 |
934 if (ret == -1) | 934 if (ret == -1) |
935 aim_conn_close(conn); | 935 aim_conn_close(sess, conn); |
936 | 936 |
937 return ret; | 937 return ret; |
938 } | 938 } |