**** BEGIN LOGGING AT Thu Jul 08 02:59:57 2010 Jul 08 12:35:22 pessi: I removed the MBM voicecall support from the plugin btw. Since non of our cards do a proper job. If you figure it out and even the older cards do something useful, feel free to add it back to it. Jul 08 12:35:30 Right now we are treating MBM as data only cards. Jul 08 12:46:02 yes.. I'll see if we get an MBM modem with voice here Jul 08 18:51:11 Ok, I must be getting old in my age, but what is this syntax? Jul 08 18:51:15 idle_mode_text = stk->idle_mode_text ?: ""; Jul 08 18:57:57 I think it's a GCC-ism? Jul 08 18:58:11 a ?: b is a contraction of a ? a : b Jul 08 19:06:58 Some people just can't resist ;) Jul 08 22:09:07 i thought it was quite popular and included in some late standard Jul 08 22:09:36 (maybe in C++) Jul 08 22:11:33 it's same as || in some other languages Jul 08 22:15:26 Personally I've never seen it in C or C++ **** ENDING LOGGING AT Thu Jul 08 22:47:23 2010 **** BEGIN LOGGING AT Fri Jul 09 00:18:14 2010 Jul 09 01:59:21 denkenz: I don't like to duplicate the logic in phonesimmodem either. But i think the way to do it in sim-poll.c is not correct, for phonesim doesn't need to poll at all. Can I do the logic in atmodem/stk.c with some quirk (similar to the thing in atmodem/network-registration.c)? Jul 09 02:00:43 I just figure you want to stick your TCMD handler in sim-poll.c and re-use the fetch_cb Jul 09 02:00:56 That way you basically write 2 functions and have it done Jul 09 02:01:42 I'm not advocating the use of the entire atmodem_poll_enable stuff Jul 09 02:01:48 That is andrew's playground Jul 09 02:05:07 yang_office: Alternatively you can stick the various CSIM parsers into a utility file and re-use it Jul 09 02:05:15 But I think that's too much work for this particular case Jul 09 02:16:22 denkenz: Putting CSIM parsers into an utility file is the most clean way. Jul 09 02:16:43 As sim-poll and the notification way both need it. Jul 09 02:17:10 If I implement this approach, is that ok for you? Jul 09 02:17:48 I think in this way, I need to create a new file in drivers/atmodem. Jul 09 02:17:51 I still don't understand why putting in 2 5 line functions is a problem? Jul 09 02:18:10 In concept, it's not polling. Jul 09 02:18:52 So who cares ;) Jul 09 02:19:18 This is phonesim, it doesn't have to look pretty Jul 09 02:20:02 alright, i can make it into sim-poll.c Jul 09 02:20:26 After all, it's the simplest way now;) Jul 09 02:20:56 Yeah, do the simple thing for now Jul 09 02:21:06 If we ever need to clean it up, we can restructure it smartly Jul 09 02:21:13 But duplicating code at this point is not worth it Jul 09 02:24:28 Yeah, I hate duplicate a lot of code. Jul 09 02:25:37 It would be better if we have some way like C++ inheritance. Jul 09 02:26:08 So the things can be shared in function level. Jul 09 02:27:35 By the way, is it better if I move fench and fench_cb into stk.c? Jul 09 02:28:22 For sure, I need the fetch function to be external, so that sim-poll can use it. Jul 09 02:28:48 It's the same idea as putting them into an utility file. Jul 09 02:30:14 You can probably put fetch & fetch_cb into stk.c Jul 09 02:30:24 Then quirk stk.c for phonesim Jul 09 02:30:29 yep Jul 09 02:30:38 However, you'd need to export fetch to sim-poll.c Jul 09 02:30:40 I think this is a reasonable change. Jul 09 02:30:56 yes, I need fetch to be external function. Jul 09 02:31:44 If you're ok with this way, I will begin to modify the code:) Jul 09 02:32:05 Sure, the only tricky bit is the header to export this function Jul 09 02:32:19 Yes, a new header file. Jul 09 02:32:36 Ok, just do what sim-poll.h does Jul 09 02:32:44 I'd be OK with such a way Jul 09 02:32:45 But I think in concept, fetch can be belonged to stk.c Jul 09 02:32:55 ok, I will do this. **** ENDING LOGGING AT Fri Jul 09 02:59:57 2010