Changeset ed2e37f
- Timestamp:
- 2007-08-20T16:35:48Z (17 years ago)
- Branches:
- master
- Children:
- 0c60f96
- Parents:
- ba20c39
- Location:
- skype
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
skype/README
rba20c39 red2e37f 33 33 cp skype.so /usr/lib/bitlbee 34 34 35 - Start the tcp server:35 - Start skyped (the tcp server): 36 36 37 37 python skyped.py … … 48 48 - Receiving messages 49 49 50 - Writing a tcp daemon that is a gateway between Skype and tcp 50 - skyped (the tcp daemon that is a gateway between Skype and tcp) 51 52 - Error handling when skyped is not running and when it exists 51 53 52 54 What needs to be done (aka. TODO): … … 66 68 - maybe on account on/off, change our state from/to offline? so that we won't miss any message 67 69 68 - handle the case when the tcp server is not running (currently SIGPIPE is not handled at all by the plugin)69 70 70 If something does not work and it's not in the TODO section, then please contact me! 71 71 -
skype/skype.c
rba20c39 red2e37f 7 7 */ 8 8 #include <stdio.h> 9 #include <poll.h> 9 10 #include <bitlbee.h> 10 11 … … 58 59 printf("write(): %s", buf); 59 60 write( sd->fd, buf, len ); 60 61 // TODO: error handling62 61 63 62 return TRUE; … … 147 146 // new body 148 147 printf("<%s> %s\n", sd->handle, info); 149 imcb_buddy_msg(ic, sd->handle, info, 0, 0); 148 if(sd->handle) 149 imcb_buddy_msg(ic, sd->handle, info, 0, 0); 150 150 g_free(sd->handle); 151 151 sd->handle = NULL; … … 191 191 struct im_connection *ic = data; 192 192 struct skype_data *sd = ic->proto_data; 193 194 imcb_connected(ic); 195 if( sd->fd < 0 ) 193 struct pollfd pfd[1]; 194 195 pfd[0].fd = sd->fd; 196 pfd[0].events = POLLOUT; 197 198 poll(pfd, 1, 1000); 199 if(pfd[0].revents & POLLHUP) 196 200 { 197 201 imcb_error( ic, "Could not connect to server" ); … … 199 203 return FALSE; 200 204 } 205 imcb_connected(ic); 201 206 return skype_start_stream(ic); 202 207 }
Note: See TracChangeset
for help on using the changeset viewer.