Re: Dynany



Michael Meeks wrote:
> 
> 	;-> quite. BTW. can you always CC the list; for archive purposes - we
> need to dilute all the old advice with lots of new - different advice
> ;-)
> 

cc'd :)

> 
> 	Add it to the glib main-loop.

I wrestled with this for about 2 days, and couldn't get it to work at 
all. I copied all of the code from linc in the end, and even that 
wouldn't work (which I don't understand at the moment), although I'm 
only using an old linc (1.0.1).

> 
> 	Interesting; poke at the linc code that does exactly this;
> ORBit2/linc2/src/linc-connection.c (in HEAD) - you can't re-use that
> API, but you can try and use what it uses. Perhaps you want G_IO_PRI and
> some other error conditions in there.
> 

Ahh. I've not updated to HEAD yet. I probably should I guess, I'm just 
using the FreeBSD ports version. (gcc -o lazy -c lazy.c :)) But I did 
manage to get it to work in the end - I thought I'd post it back to the 
list for anyone else trying to do it.

> 
> 	You can't hook linc in HEAD; just hook into the glib mainloop; 
> 

What's changed? In the end, I had success with:

linc_io_add_watch_fd(s, G_IO_IN | G_IO_ERR | G_IO_HUP | G_IO_NVAL | 
G_IO_PRI, (GSourceFunc) impl_RMP_SNMPTrapd_eventfunc, servant);

Which worked a treat, and was actually surprisingly easy compared to 
some other things I've tried. Are there any downsides of doing this (has 
linc_io_add_watch_fd changed in HEAD?

I'll try updating to head next, and see how I fare with that.

Thanks for all your help. :)

Cheers,
Chris.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]