[00:11] < Davbo> Ah |
[00:11] < Davbo> fixed it |
[00:12] < Davbo> no idea what it was |
[00:13] < j_baker> Heh... I love those errors. |
[00:15] < Davbo> time for a huuuge patch |
[00:22] < Davbo> brb |
[00:24] *** Davbo has joined #kamaelia |
[00:40] < Lawouach> well good night :) |
[00:41] < Davbo> g'night Lawouach |
[00:41] < Lawouach> ta |
[00:41] < Lawouach> way too many rhums again |
[00:42] < Lawouach> meh |
[00:42] < Davbo> rhums? lol |
[00:42] < Lawouach> what? |
[00:42] < Lawouach> meh |
[00:43] < Davbo> I assume that's the same as Rum? |
[00:43] < Lawouach> yeap |
[00:43] < Davbo> like, Bacardi or something |
[00:43] < Lawouach> we spell it rhum |
[00:43] < Davbo> Oh I see :) |
[00:43] < Lawouach> which is actually correct too ;) |
[00:43] < Davbo> cool, not a big fan of Rum myself though. |
[00:44] < Lawouach> oh you haven't tasted the way we make them |
[00:44] < Lawouach> trust me |
[00:44] < Lawouach> you'd love them :) |
[00:44] < Davbo> Hehe, I'll have to try some |
[00:45] < Lawouach> INdeed |
[00:45] < Lawouach> for instance, grab a good bottle of rhum and put some spices and vanillas in it for a few month |
[00:45] < Lawouach> then have a sip |
[00:46] < Lawouach> we stuff our rum of lots of different sweets, spices and fruits |
[00:46] < Lawouach> we call that "rhum arrangé" |
[00:46] < Davbo> that actually sounds quite nice |
[00:46] < Lawouach> it's brilliant |
[00:46] < Lawouach> it doesn't taste strong most of the time but has a very fine taste |
[00:46] < Lawouach> anyway |
[00:47] < Lawouach> had one too many this evening :) |
[00:47] < Davbo> Ah, the strong taste is what puts me off Rum tbh. |
[00:47] < Davbo> Whisky i'm okay with but something about Rum |
[00:47] < Davbo> I'll keep an eye out for it Lawouach :) |
[00:47] < Lawouach> ;)= |
[00:48] < Lawouach> I'll find you a recipe :) |
[00:48] < Lawouach> anyway |
[00:48] < Lawouach> goid night for now |
[00:48] < Lawouach> good |
[00:48] < Lawouach> damn it |
[00:49] < Davbo> hehe, night Lawouach |
[00:51] < Lawouach> also, before I go, I had a few of those: http://en.wikipedia.org/wiki/Mojito |
[00:51] < Lawouach> You should find a bar making good ones of those |
[00:51] < Lawouach> they are very refreshing |
[00:54] < Davbo> sounds nice |
[00:54] *** Davbo adds Mojito to his list |
[00:56] < Davbo> Heh i have all the ingredients for that cocktail anyway. Could give it a go |
[01:59] *** j_baker-laptop has joined #kamaelia |
[07:30] *** sadrul has joined #kamaelia |
[07:35] < Lawouach> morning |
[07:48] < MS-> morning |
[07:48] < MS-> (will be largely away from connectivity today) |
[07:48] < MS-> (trains, meeting, trains) |
[07:50] < Lawouach> hi mate |
[07:50] < Lawouach> that's okay |
[07:51] < Lawouach> as you might have seend yesterday |
[07:51] < Lawouach> I have ssl working with Kamaelia |
[07:51] < Lawouach> not that tough overall |
[07:51] < Lawouach> kiddin there :) |
[07:51] < Lawouach> was hell |
[07:53] < Lawouach> MS-: http://pastebin.com/d5b4c0ae |
[07:53] < Lawouach> that's basically the whole modification right there |
[07:53] < Lawouach> in ConnectedSocketAdapter |
[07:55] < Lawouach> There are few bits and pieces elsewhere but that's the core idea on already connected socket |
[07:55] *** MS- looks |
[07:55] < MS-> Where's the SSL code? |
[07:55] < MS-> Oh that line? |
[07:56] < MS-> That's the core? |
[07:56] < MS-> self.socket = SSLSocket(self.socket) |
[07:56] < Lawouach> line 11 to 27 |
[07:56] < Lawouach> well the lines around are critical too |
[07:56] < Lawouach> that one is just wrapping the connected socket into a ssl object |
[07:57] < Lawouach> it's not why it works K. |
[07:57] < Lawouach> it's the lines just before and right after |
[07:57] < MS-> The 11 to 27 |
[07:57] < MS-> yes |
[07:57] < Lawouach> basically removing the socket from the selector component |
[07:57] < Lawouach> and adding the SSLed-socket back to the selector component |
[07:57] < MS-> Remove it, SSLise, re-add |
[07:57] < Lawouach> yes |
[07:58] < MS-> Why do you yield in the if ? |
[07:58] < Lawouach> hmm |
[07:58] < Lawouach> forgot that one :) |
[07:58] < Lawouach> :p |
[07:58] < MS-> hm. That code works by chance I think , I think actually it needs a yield after the first send |
[07:58] < MS-> say in line 16 |
[07:58] < Lawouach> eh eh |
[07:58] < MS-> to allow the selector to remove it |
[07:58] < Lawouach> I had one right there |
[07:59] < MS-> since the selector runs in a thread these days |
[07:59] < Lawouach> but that's ok |
[07:59] < Lawouach> because in the selector component |
[07:59] < MS-> that is probably working by chance rather than by design |
[07:59] < Lawouach> I changed the order of some of the calls |
[07:59] < Lawouach> that's why it works |
[07:59] < MS-> Ah, OK |
[07:59] < Lawouach> I swapped the order between the remove and insert boxes :) |
[08:00] < MS-> Does SSLSocket change the filedescriptor number of the socket? |
[08:00] < Lawouach> no |
[08:00] < MS-> It just wraps the socket object? |
[08:00] < Lawouach> it basically wraps the socket using: socket.ssl(sock) |
[08:00] < Lawouach> yeap |
[08:00] < MS-> k |
[08:01] < Lawouach> the problem with that call is that the built-in socket.ssl does not do certificate verification |
[08:01] < MS-> And you remove it from the selector to prevent any accidental reading? |
[08:01] < Lawouach> I've tried the new ssl module but no luck |
[08:01] < Lawouach> it would close the connection eventually |
[08:01] < Lawouach> can't find out why |
[08:01] < Lawouach> yes |
[08:01] < MS-> In which case that code is safe :) |
[08:01] < MS-> which is cool |
[08:01] < Lawouach> eh eh not my first time officer :) |
[08:02] < MS-> I realise that, just asking the dumb questions to check I understand :) |
[08:02] < Lawouach> Anyhow I think my code is just a proof that it can work without breaking the whole API |
[08:02] < MS-> That clearly works nicely |
[08:02] < Lawouach> To make it into the repository we'll need a bit more code review |
[08:03] < Lawouach> The isSSL attribute is a necessary flag |
[08:03] < Lawouach> In the _safeReceive method, when the data read is empty the default behavior is to shutdown the connection |
[08:03] < Lawouach> however in a SSL context, the SSL object may be simply trying to read when the buffer is empty |
[08:04] < Lawouach> which should not close down the connection per se |
[08:04] < MS-> hm |
[08:04] < Lawouach> so that flag helps in one or two places to basically say "oh that's ok indeed" |
[08:04] < MS-> I see |
[08:05] < Lawouach> http://pastebin.com/d15f40e95 |
[08:05] < Lawouach> I've updated the paste |
[08:06] < Lawouach> See the read/send methods |
[08:06] < Lawouach> when the SSL layer has starved the buffer and tries a read again it raises those errors |
[08:06] < MS-> return self.sslobj.read(size) can happily return 0 |
[08:06] < Lawouach> But it's not an indication that the socket closed |
[08:06] < MS-> or rather an object of zero size |
[08:06] < MS-> fun and games |
[08:07] < Lawouach> well |
[08:07] < Lawouach> you're kidding but that only aspect actually took me hours to find out |
[08:07] < Lawouach> because in a normal socket behavior that really means "close down the connection" |
[08:07] < Lawouach> :) |
[08:07] < MS-> I'm sure it took time |
[08:08] < MS-> "fun & games" is what I say when most other people say "complete sod" |
[08:08] < Lawouach> :p |
[08:08] < Lawouach> well on the whole it took me two evenings |
[08:08] < Lawouach> so that's ok |
[08:08] < Lawouach> and I learnt more about the ConnectedSocketAdapter module |
[08:09] < Lawouach> so that's cool :) |
[08:09] < MS-> Cool |
[08:09] < Lawouach> I'll let you be now :) |
[08:09] < MS-> It's one of the oldest modules, and been modified over time, but shows it's age I think |
[08:10] < Lawouach> Oh yes |
[08:10] < Lawouach> The code is... not pretty pretty :) |
[08:10] < Lawouach> but it works well |
[08:10] < MS-> Yep |
[08:10] < MS-> Pays attention to correctness as well |
[08:11] < Lawouach> indeed :) |
[08:12] < Lawouach> anyway that now means I can play my XMPP code against Google Talk :) |
[08:12] < Lawouach> That's fun :) |
[08:13] < MS-> Excellent :) |
[08:14] < MS-> You've seen this trick from here: |
[08:14] < MS-> http://kamaelia.svn.sourceforge.net/viewvc/kamaelia/branches/private_MPS_Scratch/Apps/Kamaelia-Grey/App/greylisting.py?revision=3684&view=markup |
[08:15] < MS-> 600 class GreylistServer(MoreComplexServer): |
[08:15] < MS-> .. |
[08:15] < MS-> 605 class TCPS(TCPServer): 606 |
[08:15] < MS-> CSA = NoActivityTimeout(ConnectedSocketAdapter, timeout=config["inactivity_timeout"], debug=False) |
[08:15] < MS-> I presume? |
[08:16] < MS-> enablig... |
[08:16] < MS-> class SSLServer(MoreComplexServer): |
[08:16] < MS-> class TCPS(TCPServer): |
[08:16] < MS-> CSA = SylvainsNewVersionOfCSA # ? |
[08:17] < Lawouach> I didn't remember it no |
[08:18] < Lawouach> well |
[08:18] < Lawouach> the pb is that I had to modify TCPClient |
[08:18] < Lawouach> to add two boxes |
[08:19] < Lawouach> a makessl as an inbox |
[08:19] < Lawouach> a sslready as an outbox |
[08:19] < MS-> yes |
[08:19] < Lawouach> so you can't just use your trick above ;) |
[08:19] < MS-> In which case I need to think of a way to make that trick more capable :-) |
[08:19] < MS-> Which is neat |
[08:19] < MS-> I like that sort of problem |
[08:20] < MS-> Whether we'd want to use it, dunno :) |
[08:20] < Lawouach> :) |
[08:22] < MS-> OK, afk. Back late this evening. (ie after 10pm) if back on at all today :) |
[08:22] < MS-> have a nice day |
[08:22] *** MS- has parted #kamaelia |
[08:50] *** orphans has joined #kamaelia |
[09:14] *** Uraeus has joined #kamaelia |
[09:18] *** bcarlyon|laptop has joined #kamaelia |
[10:19] < vmlemon> Hi |
[11:52] *** Lawouach has joined #kamaelia |
[12:27] *** Davbo has joined #kamaelia |
[12:33] *** Davbop has joined #kamaelia |
[13:33] *** Davbo has joined #kamaelia |
[13:35] *** Davbo has parted #kamaelia |
[13:35] *** Davbo has joined #kamaelia |
[13:35] *** Davbo has parted #kamaelia |
[13:51] *** Davbo has joined #kamaelia |
[13:51] *** Davbo has parted #kamaelia |
[14:33] *** vmlemon has joined #kamaelia |
[15:04] *** Davbo has joined #kamaelia |
[15:07] *** j_baker has joined #kamaelia |
[17:25] *** sadrul has joined #kamaelia |
[18:05] < orphans> mhrd, Lawouach, ping? |
[18:06] < Lawouach> pong |
[18:07] < orphans> hey, you got a moment to look at some code - I'm getting 100% cpu usage and I have no idea why :) |
[18:08] < Lawouach> sure |
[18:08] < Lawouach> shoot |
[18:09] < orphans> erm, maybe easier if I do a commit - that cool by you? |
[18:09] < Lawouach> yeap |
[18:16] < orphans> Lawouach, ok - commited. the thing which is dodgy is UITest.py - if you have a console echoer after the OSC element it works fine, but if you stick a simplepeer the cpu jumps to 100% |
[18:18] < Lawouach> hang on |
[18:19] < Lawouach> meh |
[18:19] < Lawouach> I forgot to install OSC |
[18:19] *** Lawouach is reading orphans's INSTALL instructions |
[18:19] < orphans> :) yay! |
[18:20] *** orphans notices install instructions are wrong :S |
[18:20] *** Uraeus has joined #kamaelia |
[18:21] < Lawouach> bah |
[18:21] < Lawouach> so I launch UITest.py |
[18:21] < Lawouach> what should I do next? |
[18:22] < orphans> ok, in UITest.py uncomment the line which creates the SimplePeer and the line which links it in the graphline |
[18:22] < orphans> and see your cpu shoot up :) |
[18:24] < Lawouach> indeed |
[18:25] < orphans> kinda finding it hard to see where that's happening though, given that you're just sticking an extra component in the chain |
[18:25] < Lawouach> the SimplePeer doesn't have a self.pause() |
[18:25] < Lawouach> That'd explain the CPU consumption |
[18:25] < orphans> yeah, I saw that - should it have? |
[18:26] < orphans> :) |
[18:27] < Lawouach> bingo |
[18:27] < Lawouach> I added it and the CPU does fine |
[18:27] < Lawouach> weird it missed it |
[18:27] < orphans> how come if you just pipeline a chargen to the SimplePeer it doesn't happen? |
[18:27] < orphans> (as is in the simplepeer tests) |
[18:28] < Lawouach> I'm not sure |
[18:30] < orphans> fair enough :) |
[18:31] < orphans> should I email a patch to put the pause in to the list? |
[18:33] < Lawouach> You may yes but I think MS could have an explanation :) |
[18:34] < orphans> k - I'll ask MS when he's around. Cheers for the help Lawouach |
[18:34] < Lawouach> np |
[18:35] *** orphans will hopefully have the first bit of sound playing over the next half-hour or so |
[18:50] < Lawouach> :) |
[19:32] *** bcarlyon|ubuntu has joined #kamaelia |
[19:33] *** bcarlyon|ubuntu has joined #kamaelia |
[20:39] *** Davbo wonders how he ever programmed Java without Eclipse |
[21:25] < Davbo> s/programmed/ coded in |
[21:25] < Davbo> don't want Sun suing me for libel over these IRC logs ;) |
[21:26] *** Davbo didn't actually program Java. - It's the last programming language I'd want to take credit for |
[22:49] *** Davbo has joined #kamaelia |