All pastes #828772 Raw Edit

Stuff

public text v1 · immutable
#828772 ·published 2007-12-22 18:51 UTC
rendered paste body
Dec 19 12:26:24 <KaKaRoTo>	but the higher layers (the session layer) was bad bad bad
Dec 19 12:26:59 <oleavr>	ok (haven't yet looked at it after the rewrite, been planning to for a while but always got caught up in other things)
Dec 19 12:27:02 *	ferulo (n=fherrera@100.Red-88-7-33.staticIP.rima-tde.net) has joined #pymsn
Dec 19 12:27:15 <KaKaRoTo>	_blob_to_session wasn't just finding a session for a blob, it would create a session, do stuff for when we receive a new session, do ALOT of stuff... 
Dec 19 12:27:26 <KaKaRoTo>	but it was called also from when we get a _blob_sent
Dec 19 12:27:52 <KaKaRoTo>	it was really really crazy, look at this
Dec 19 12:27:55 <KaKaRoTo>	we receive a webcam invite
Dec 19 12:28:01 <KaKaRoTo>	so we get _blob_received
Dec 19 12:28:06 <KaKaRoTo>	it calls blob_to_session
Dec 19 12:28:17 <KaKaRoTo>	blob_to_session actually creates a new IncomingP2PSession
Dec 19 12:28:27 <KaKaRoTo>	then does a signal.emit("incoming-session"
Dec 19 12:28:47 <KaKaRoTo>	it gets caught by MSNObjectStore which checks and finds out it's not a DP session (it's a webcam session) so it calls reject
Dec 19 12:29:07 <KaKaRoTo>	so we reject the session, we send the decline
Dec 19 12:29:12 <KaKaRoTo>	then we get blob_sent called 
Dec 19 12:29:18 <KaKaRoTo>	which calls blob_to_session again
Dec 19 12:29:32 <KaKaRoTo>	then the 'incoming-session' signal emission returns
Dec 19 12:29:41 <KaKaRoTo>	and blob_to_session returns a new session to blob_received
Dec 19 12:29:49 <KaKaRoTo>	which notifies it of our initial invite
Dec 19 12:30:04 <oleavr>	LOLOL!
Dec 19 12:30:19 <KaKaRoTo>	but when the session object receives the notification of the 'invite' the session was already rejected and destroyed!!!!!
Dec 19 12:30:19 <KaKaRoTo>	lol
Dec 19 12:30:51 <KaKaRoTo>	it took me a few days to figure out this code path! lol