As I understand it, MODE_SRV / MODE_CLI are not the same thing than OBEX_MODE_SERVER / OBEX_MODE_CLIENT.
MODE_SRV / MODE_CLI are used to remember if we are sending the current cmd frame or receiving the cmd reply frame, no matter whether we are a CLIENT or a SERVER. OBEX_MODE_SERVER / OBEX_MODE_CLIENT are used to indicate the obex handle mode (client if we are sending requests, server if we are receiving requests). Eric. -----Original Message----- From: Hendrik Sattler [mailto:[EMAIL PROTECTED] Sent: vendredi 11 janvier 2008 14:46 To: openobex-users@lists.sourceforge.net Cc: Eric Lapuyade Subject: Re: [openobex-users] OBEX_EV_REQDONE mode problem in cvs version Hi Eric, I took a close look now and maybe Zany can comment on that, too. Why at all is MODE_SRV used in lib/obex_client.c. This looks totally wrong. Actually, MODE_SRV and MODE_CLI should _only_ be set in lib/obex.c! Either you currently use a handle as client or as server. It should surely be possible to use the same obex handle for both but not at the same time! You can have more than one obex handle, though, each using the same callback. A patch could involve the following: - fix the STATE_* and MODE_* mixup in one variable: * either don't use the state enum (->unpredictable member values) but defines * use the state enum with assigned values (still ugly) * seperate mode and state variables in struct obex (**best**) - never set the MODE_* parts anywhere but in lib/obex.c, thus only set by * OBEX_Init (be MODE_SRV by default) * OBEX_ServerAccept (MODE_SRV) * OBEX_Request (MODE_CLI) Does that sound reasonable? HS ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ Openobex-users mailing list Openobex-users@lists.sourceforge.net http://lists.sourceforge.net/lists/listinfo/openobex-users