Mercurial > pidgin
comparison plugins/gaim-remote/remote-socket.c @ 10395:b4b9dabdd7c7
[gaim-migrate @ 11624]
Some whitespace fixes, a compile warning fix, and add a "logout" option
to gaim-remote
committer: Tailor Script <tailor@pidgin.im>
| author | Mark Doliner <mark@kingant.net> |
|---|---|
| date | Fri, 17 Dec 2004 23:30:38 +0000 |
| parents | 5239a3b4ab33 |
| children | 5364929fad9b |
comparison
equal
deleted
inserted
replaced
| 10394:45a0a07e8b25 | 10395:b4b9dabdd7c7 |
|---|---|
| 22 /* Somewhat inspired by XMMS: | 22 /* Somewhat inspired by XMMS: |
| 23 * Copyright (C) 1998-2002 Peter Alm, Mikael Alm, Olle Hallnas, | 23 * Copyright (C) 1998-2002 Peter Alm, Mikael Alm, Olle Hallnas, |
| 24 * Thomas Nilsson and 4Front Technologies | 24 * Thomas Nilsson and 4Front Technologies |
| 25 * Copyright (C) 1999-2002 Haavard Kvaalen | 25 * Copyright (C) 1999-2002 Haavard Kvaalen |
| 26 */ | 26 */ |
| 27 | 27 |
| 28 /* This provides code for connecting to a Gaim socket and communicating with | 28 /* This provides code for connecting to a Gaim socket and communicating with |
| 29 * it. It will eventually be made a library once the core and ui are split. */ | 29 * it. It will eventually be made a library once the core and ui are split. */ |
| 30 | 30 |
| 31 #include "internal.h" | 31 #include "internal.h" |
| 32 #include <sys/un.h> | 32 #include <sys/un.h> |
| 138 | 138 |
| 139 if (!(read(fd, &p->length, sizeof(p->length)))) { | 139 if (!(read(fd, &p->length, sizeof(p->length)))) { |
| 140 g_free(p); | 140 g_free(p); |
| 141 return NULL; | 141 return NULL; |
| 142 } | 142 } |
| 143 | 143 |
| 144 if (p->length) { | 144 if (p->length) { |
| 145 data = g_malloc(p->length); | 145 data = g_malloc(p->length); |
| 146 | 146 |
| 147 if (!(read(fd, data, p->length))) { | 147 if (!(read(fd, data, p->length))) { |
| 148 g_free(p); | 148 g_free(p); |
| 191 if (fd > 0) { | 191 if (fd > 0) { |
| 192 pack = gaim_remote_packet_new(CUI_TYPE_META, CUI_META_PING); | 192 pack = gaim_remote_packet_new(CUI_TYPE_META, CUI_META_PING); |
| 193 gaim_remote_session_send_packet(fd, pack); | 193 gaim_remote_session_send_packet(fd, pack); |
| 194 gaim_remote_packet_free(pack); | 194 gaim_remote_packet_free(pack); |
| 195 close(fd); | 195 close(fd); |
| 196 | 196 |
| 197 return TRUE; | 197 return TRUE; |
| 198 } | 198 } |
| 199 | 199 |
| 200 return FALSE; | 200 return FALSE; |
| 201 } | 201 } |
| 202 |
