IRC log of #maemo-ssu for Friday, 2012-09-21

*** lizardo has quit IRC00:01
*** Guest44583 has quit IRC00:07
luf~seen pali00:32
infobotpali <~pali@unaffiliated/pali> was last seen on IRC in channel #maemo, 1d 5h 54m 6s ago, saying: 'and usb cable (in pc suite/usb mass storage)?'.00:32
luffreemangordon: I have a fix for the bluez BT name ;) I'm not sure it's the final but you know ...00:43
*** myuu__ has joined #maemo-ssu00:43
*** _ade_ has quit IRC01:05
luffreemangordon: the fix works as expected. Only set it during boot. Not on repeatable BT on/off actions.01:15
*** luf1 has joined #maemo-ssu01:18
*** _rd has quit IRC01:34
*** ekze has quit IRC01:51
freemangordonluf: ok, will ask you for details tomorrow :)01:55
merlin1991luf: but what if someone changes the device name in the menu?01:59
lufmerlin1991: It should still work. The fix only set "some" name during boot. It doesn't load the name or do something more.02:09
lufI'm going to the bed now. Good night.02:10
*** luf has quit IRC02:11
*** luf1 has quit IRC02:15
*** M4rtinK has joined #maemo-ssu02:24
*** M4rtinK has quit IRC02:35
*** arcean has quit IRC03:03
*** nox- has quit IRC03:30
*** ekze has joined #maemo-ssu04:24
*** amiconn_ has joined #maemo-ssu05:27
*** amiconn has quit IRC05:27
*** amiconn_ is now known as amiconn05:27
*** DocScrutinizer05 has quit IRC06:44
*** DocScrutinizer05 has joined #maemo-ssu06:44
*** freemangordon has quit IRC08:07
keriogoddammit i needed fmg :(08:18
*** M13 has joined #maemo-ssu08:54
*** freemangordon has joined #maemo-ssu09:02
*** _rd has joined #maemo-ssu09:17
*** luf has joined #maemo-ssu09:22
*** povbot has joined #maemo-ssu09:33
*** ChanServ sets mode: +v povbot09:33
*** ekze has quit IRC10:10
*** ekze has joined #maemo-ssu10:18
*** X-Fade has quit IRC10:24
*** X-Fade has joined #maemo-ssu10:24
*** _rd has quit IRC11:32
*** arcean has joined #maemo-ssu11:39
*** dhbiker has quit IRC11:40
*** M4rtinK has joined #maemo-ssu11:51
*** wmarone_ has joined #maemo-ssu12:05
*** wmarone__ has quit IRC12:05
*** toxaris has joined #maemo-ssu12:08
*** arcean_ has joined #maemo-ssu12:27
*** arcean has quit IRC12:30
*** Flyser has quit IRC13:10
*** dhbiker has joined #maemo-ssu13:21
*** lizardo has joined #maemo-ssu13:24
*** arcean_ is now known as arcean13:56
luffreemangordon: ping14:40
*** toxaris has quit IRC14:48
*** fredrinLap has quit IRC15:06
*** fredrinLap has joined #maemo-ssu15:10
freemangordonluf: pong15:20
luffreemangordon: I'm uploading new version and the patch to the merlin1991.15:29
lufI want also something else but I forget it :(15:30
freemangordonluf: may I see the patch?15:30
lufSure.15:31
freemangordonluf: write those down, and hope you'l not forget that you wrote it. And where :P15:31
luf:D Sure.15:31
freemangordonit the patch somewhere in github/gitorious?15:32
freemangordonpastebin?15:32
lufNope. MMNT15:32
freemangordonok :)15:32
lufhttp://merlin1991.at/~luf/bluez/source/221_name_init.patch15:35
lufI don't like it very much but it works.15:36
freemangordonhehe15:36
lufI'll upload also logs so you can take a look what happens in N900 ;)15:36
freemangordonwhy didn't you implement that on ON?15:36
freemangordonbut on OFF15:36
lufYou'll see in logs.15:36
freemangordonaah, ok15:37
lufMMNT @work15:37
lufI received some request so I have to focus on that right now.15:37
freemangordonok, no hurry15:38
lufThe reason is that the answer from kernel comes after the BT dev is changed to state DOWN (if down is default).15:38
freemangordonhmm, and what 4.60 does?15:38
lufWhen the BT device is by default on it stays on and the answer from kernel is processed well.15:39
lufNothing like that :)15:39
freemangordon:)15:39
lufHuge rework in name ... as it's splitted to adapter name and device name in 4.99.15:39
freemangordonI see15:39
freemangordonwell, I agree the patch looks ugly, but as long as it works (and merlin1991 approves it) it should be ok15:40
freemangordoni'll try to fix packaging later15:40
lufI don't understand why the kernel answer is postponed :(15:42
freemangordonhmm, could it be that the queue is not processed?15:42
freemangordoni.e. noone reads the socket when there is a message15:44
luffreemangordon: possible. But I don't see it in the source code.15:45
luflogs uploaded.15:46
lufmerlin1991.at/~luf/bluez/logs15:46
luffreemangordon: the patch is like hammer. It fix only the situation when no name initialized when booting with by default disabled BT device.15:47
freemangordonyeah, I see15:48
lufI want to be as few invasive as possible. It would be better to find the root cause but I'm affraid it's in kernel maybe.15:48
lufsyslog.bluez_4.99.devoff - booting with BT disabled by default15:49
lufsyslog.bluez_4.99.devon - booting with BT enabled by default15:50
freemangordonluf: but why there is this:15:50
lufsyslog.bluez_4.99.fixed_btname_v1 - booting with BT disabled by default with the patch15:50
keriofreemangordon: btw busybox-power was updated15:50
keriono versioning issue for that15:50
freemangordonthe fuck, paste don't work :(15:50
luffreemangordon: :)15:51
freemangordonok, i'll write it15:51
luffeel free to write filename and line number ;)15:51
freemangordon'Setting name Luf - Nokia N900'15:51
freemangordonin devoff file15:51
lufIt's trying to set the name and send it into kernel. But the answer returned after HCI dev down.15:52
freemangordonaaah, I see15:52
freemangordonluf: i'll have a look into the code15:53
lufI traced it down to hci_send_command (plugins/hciops.c:hciops_set_name() OCF_CHANGE_LOCAL_NAME: sent Luf - Nokia N900)15:53
freemangordonyes15:53
freemangordonI saw that15:53
lufanswer is: plugins/hciops.c:cmd_complete() OCF_CHANGE_LOCAL_NAME: index 0 status 015:53
freemangordonok15:53
lufbelow: HCI dev 0 down15:53
lufThat's the problem.15:53
freemangordonok, got it15:54
lufThere is no "HCI dev 0 down" when BT device is enabled by default so the name is set as expected.15:54
lufNo idea why plugins/hciops.c:io_security_event is postponed (it's some callback).15:55
*** NIN101 has joined #maemo-ssu16:06
*** M13 has quit IRC16:11
lufThe reading from kernel/AF_BLUETOOTH socket is done using g_io_add_watch_full(chan, G_PRIORITY_LOW, cond, io_security_event, GINT_TO_POINTER(index), NULL);16:13
freemangordonluf: it seems kernel is missing a call to hci_req_complete16:18
freemangordonfor HCI_OP_WRITE_LOCAL_NAME16:19
freemangordonnwer kernels have it16:19
freemangordon*newer16:19
freemangordonhmm, actually kernel is missing LOTS OF code, I wonder how this works at all :D16:21
freemangordonluf: I think I have a better idea16:29
lufShit. I don't want to patch kernel ... but maybe I should :(16:29
freemangordoninstead of using "the hammem"16:29
freemangordonno,no16:29
luffreemangordon: I'm listening.16:29
freemangordonwe won't touch the kernel16:29
freemangordonso,...16:29
lufWhy not?16:29
luf:)16:29
freemangordonhehe16:30
freemangordonso,...16:30
lufIt should go into KP52 or KP53 ...16:30
freemangordoncall OCF_READ_LOCAL_NAME16:30
freemangordonafter the call OCF_CHANGE_LOCAL_NAME16:30
freemangordonthat way we will mimic the expected behaviour16:31
lufI don't understand what do you mean with call OCF_READ_LOCAL_NAME?16:31
freemangordonfuuck, why copy/paste don't work16:31
freemangordonstupid remmina :(16:31
lufAaah hci_send_cmd ... I get it.16:31
freemangordonyes16:31
lufso OCF_READ_LOCAL_NAME + OCF_CHANGE_LOCAL_NAME + inquiry ?16:32
freemangordonthe opposite16:32
freemangordonfirst change and the read16:32
lufAhhh sorry my mistake.16:32
freemangordonor change + inquiry (i don't know what inquiry does)16:33
lufOk. I'll try it.16:33
freemangordonluf, I don't know what completion comes on device off16:33
freemangordonbut it is not for name change AIUI16:33
lufwhere did you find missing hci_req_complete ?16:34
freemangordonmy point was 1. change 2. read 3. immediately use the name from the kernel16:34
*** dafox has joined #maemo-ssu16:34
freemangordonthat way if kernel change operation has failed for some reason , your read will return blank16:35
freemangordon(and it will be the same as change complete never comes)16:35
freemangordonluf: in internet, newer kernels16:35
freemangordonlook for hci_cc_write_local_name16:36
freemangordongoogle for ^^^16:36
freemangordonluf: AIUI the complition is first found in 3.016:38
freemangordonmgmt_set_local_name_complete ;)16:38
freemangordonkernel function16:38
lufHmm it seems to me that reading form the socket is in main loop. And during the initialization there is no possibility to get into main loop.16:43
freemangordonyou mean the you cannot get the result from "read"?16:44
lufI think so.16:45
lufBut I should be wrong.16:45
freemangordonluf: damn, code does exactly this :D16:48
freemangordonlook in hciops.c16:49
freemangordoncmd_complete()16:49
lufYes I know.16:49
lufBut it waits for the kernel response which come so late.16:49
lufI think you want to send it ASAP :)16:50
freemangordonluf: it wait for response that never comes16:50
freemangordon*waits16:50
freemangordonAIUI16:50
freemangordonno matter on/off trickery16:50
lufIt comes after the dev is down.16:51
freemangordonlook at mgmt_handle_event16:51
lufwhat file?16:51
freemangordonmain.c16:51
freemangordonthough I might be wrong16:52
lufWhy this file?16:53
freemangordonwell, i'll check the logs once again, maybe I miss something16:54
lufIt read the result using: io_security_event from plugins/hicops.c16:54
lufAnd it's assigned as callback for the kernel socket in start_hci_dev.16:55
luf... using g_io_add_watch_full16:55
freemangordonyes, you are right16:55
freemangordonanyway, can you just call the callback by hand?16:55
freemangordonthe one that handles change_complete16:56
freemangordonor just call hci_read_local_name16:58
freemangordon(in hci.c)16:58
freemangordonand read_local_name_complete after that17:00
freemangordon(in hciops.c)17:00
lufIt's all hack. I'm not sure if I may call the callback by hand. What when there is some callback.17:03
lufShit how it can work even on PC. I don't understand.17:03
freemangordonwhich kernel?17:04
lufIt doesn't matter.17:04
freemangordonit matters17:04
lufIt depend on reading from socket ...17:04
lufNot on the kernel part as I understand.17:04
freemangordonit depends on the kernel to receive completion event17:05
freemangordons/receive/send/17:05
infobotfreemangordon meant: it depends on the kernel to send completion event17:05
freemangordonmgmt that is17:05
freemangordonthough I might be wrong17:06
lufI'm sorry I can continue in the evening. Now I have to finish some work and go home.17:07
freemangordonok17:07
lufI'll try to send the read immediately after change or inquiry.17:07
lufBut I may take a look into the BT kernel part :( to include it into some of next KP releases.17:08
freemangordonluf: we are talking about CSSU here, ain't? :P17:09
lufYes about fixing problems with bluez.17:09
freemangordonhmm, I'll try to find zeq, it is time to start glibc/kernel stuff17:10
kerioyay kernel ^_^17:10
freemangordonthat way we can fix the kernel side too17:10
keriohmm, does this mean that the mp will depend on the kernel?17:11
kerio:s17:11
freemangordonkerio: unfortunately it won't happen without glibc fallback patches17:11
* freemangordon is afk too17:12
luffreemangordon: I don't think it's good to do several changes in one step.17:12
lufWhat is mp ?17:13
kerioluf: otoh, flashing the kernel is kind of a big deal17:13
kerioluf: metapackage17:13
keriomp-fremantle-community-pr17:13
keriothe thing that HAM checks to know what to upgrade17:13
merlin1991luf: I didn't read the full backlog, but is the patch nuked again or still valid?17:13
lufmerlin1991: what patch?17:14
merlin1991bt name patch17:14
lufIt's not fixing the root cause. So it works but isn't ideal.17:18
merlin1991can we fix the root cause without touching the kernel?17:19
lufIt has side effects right now because of change in kernel.17:24
lufSo we can stay on bluez-4.60. If we want to upgrade to bluez-4.99 we need also kernel patch from my point of view.17:24
lufmerlin1991: I'll investigate it more so maybe I can be wrong right now.17:26
lufAnd for sure I need to leave now.17:26
*** luf has quit IRC17:28
*** fredrinLap has quit IRC17:37
*** fredrinLap has joined #maemo-ssu17:40
*** dhbiker has quit IRC18:03
*** luf has joined #maemo-ssu18:14
*** fredrinLap has quit IRC18:17
luffreemangordon: bluez-4.60 also waits till the kernel returns OCF_CHANGE_LOCAL_NAME and then read the name.18:21
*** andre__ has quit IRC18:29
lufBut for sure there is a "hack" for off mode 4.60 :D18:31
lufstatic int adapter_setup:18:31
luf  adapter_ops->set_name(adapter->dev_id, name);18:31
luf  if (g_str_equal(mode, "off"))18:31
luf      strncpy((char *) adapter->dev.name, name, MAX_NAME_LENGTH);18:31
*** fredrinLap has joined #maemo-ssu18:34
*** fredrinLap has quit IRC18:38
*** andre__ has joined #maemo-ssu18:41
keriofreemangordon: are you the one that compiles busybox-power for -thumb? or is it iDont?18:57
DocScrutinizer05my 2 cents: kernel-x.x.88 does eventA eventB sequence. $randomBTd rev 8 depends on that. Now somebody pulls in nice new patches to elevate $randomBTd to rev 9. Rev 9 expects new kernel API that does eevntB eventA now, instead of eventA eventB.18:58
DocScrutinizer05It's NOT a good idea to elevate kernel API to match that $randomBTd rev9, since we will likely see other stuff break then18:59
DocScrutinizer05so pretty please stay with kernl-x.x.88 API/ABI rather than elevating it to leete new kernel-x.y.9919:00
DocScrutinizer05rather backport  $randomBTd rev9 patches to $randomBTd rev819:01
DocScrutinizer05(obviously omitting those that cause the API change)19:02
lufDocScrutinizer05: :D19:03
DocScrutinizer05or forward port the "borked" API details in $randomBTd rev9 from $randomBTd rev819:03
lufDocScrutinizer05: be sure we know your 2 cents ;)19:04
*** toxaris has joined #maemo-ssu19:26
kerioi'm pretty sure fmg /ignored me :(19:39
*** Pali has joined #maemo-ssu19:40
luffreemangordon: definitely the problem is in unread socket from bluetoothd side.19:59
lufIt's a little bit better if I add g_main_context_iteration(NULL, FALSE);20:00
lufBut it reads only one message per iteration and I have no idea right now how to read whole queue.20:01
Palifreemangordon, see code: https://meego.gitorious.org/~pali/meego-device-adaptation/pali-n900_libbme20:04
PaliI used socketpair instead pipe, because original libbme code returning pointer of socket20:04
Paliand application can read and write to socket20:05
Palibut from pipe only read (or write)20:05
freemangordonkerio: I was not here20:12
kerioexcuses!20:13
freemangordonand yes, it is me to compile bb-power-thumb20:13
kerio:'(20:13
kerioi feel deeply hurt20:13
kerioonly a busybox-power update could make me feel better20:13
freemangordonwhy?20:13
freemangordonaah :)20:13
freemangordonwhere is the source code?20:13
freemangordonPali: hmm, iirc there was no need of socketpair, that is why i used pipes20:14
freemangordonthough it should not matter20:14
freemangordonluf: but why only one message at a time?20:15
freemangordonI mean - what is the problem to read them all?20:15
lufBecause of the callback function.20:15
freemangordon?20:15
freemangordoncallback gets called, you continue with the next20:15
freemangordonbtw does it to select() on the socket?20:16
freemangordons/it to/it do/20:16
infobotfreemangordon meant: btw does it do select() on the socket?20:16
freemangordonluf: IIRC there was a way to read only the first "packet" from a socket and reschedule20:17
luffreemangordon: no idea. it's glib stuff. One per iteration is because of the io_security_event. It reads only one message per the iteration (maybe due to minimum blocking).20:17
freemangordonlemme ask google20:17
lufI don't understand what are you thinking about.20:18
lufhttp://developer.gnome.org/glib/2.28/glib-IO-Channels.html#g-io-add-watch-full20:18
lufhttp://developer.gnome.org/glib/2.31/glib-The-Main-Event-Loop.html#g-main-context-iteration20:19
freemangordonthanks20:19
lufThis detect there is something in the socket and call io_security_event (as defined with g_io_add_watch_full)20:19
freemangordon  io_security_event is G_CALLBACK?20:20
freemangordoni'll check it myself20:20
lufShould be.20:20
lufstatic gboolean io_security_event(GIOChannel *chan, GIOCondition cond, gpointer data)20:20
lufHmmm maybe: g_main_context_pending () :)20:21
freemangordon;)20:22
freemangordonthe fuck, what's wrong with my PC, paste still does not work :(20:22
freemangordoni'll logoff/logon, bbl20:22
*** freemangordon has quit IRC20:22
*** freemangordon has joined #maemo-ssu20:25
lufkerio: We're sorry but you're going to die :D20:26
freemangordonluf: g_main_context_pending won't do the job20:28
luf"while g_main_context_pending" do the job :)20:28
lufI hope20:28
freemangordonare you sure?20:29
freemangordonas IIRC you need ioctl(socket,FBIONREAD,&bytes_pending)20:29
lufLike a Fox. I want to believe :D20:29
freemangordonthough I might forgotten how it works20:29
freemangordonwell, lets hope then :D20:30
lufNo. I'm not sure if it's ok to mix glib + direct access to the fd ...20:30
freemangordonme neither :)20:30
freemangordonDocScrutinizer05: now i remember that we found what the problem with wlan was. wifi switcher ;)20:31
DocScrutinizer05hmß20:31
DocScrutinizer05?´20:31
DocScrutinizer05an appß20:32
DocScrutinizer05DAMMIT?20:32
DocScrutinizer05????20:32
DocScrutinizer05ß?ß?ßßß????20:32
freemangordonthe guy had uninstalled wifi switcher (or whatever was the name) and no wlan after that20:32
kerioßßßßßßßßßßßßßßßßßß20:32
DocScrutinizer05an app?`20:32
freemangordonyes20:32
DocScrutinizer05fair enough20:32
freemangordon"If I manually start icd2 as root as daemon (or with upstart) and disable & enable internet via wifi switcher. then it works."20:33
DocScrutinizer05many thanks for sharing that historic bit of info ;-)20:33
freemangordonhttp://talk.maemo.org/showpost.php?p=1270059&postcount=77620:33
DocScrutinizer05ok, seems that's absolutely the story to explain that20:33
freemangordonyeah. thuough I cannot get it why this guy refuses to reflash20:34
DocScrutinizer05I declare auto-disconnect deprectaed since years now, literally. All those hackers messing with ICD seem to have no real clue20:34
freemangordonar was it auto-disconnect?20:34
freemangordon*or20:35
*** fredrinLap has joined #maemo-ssu20:35
freemangordonnot sure, but it was either of those20:35
DocScrutinizer05some bullshit to tear down GPRS/WLAN after some time of no traffic20:35
DocScrutinizer05wifi switcher might be same class of fsckdup BS20:35
freemangordonyeah, but I am not 100% sure which was the application to blame, auto-disconnect or wifi-switcher20:36
freemangordonyeah20:36
DocScrutinizer05could those poor misguided lusers apt-get purge ICD2 ?20:37
DocScrutinizer05the reinstall20:37
DocScrutinizer05then20:37
freemangordonNFC20:37
freemangordonkerio: where is the source code of bb-power-thumb?20:39
freemangordon(new version)20:39
keriofreemangordon: dunno, hold on20:39
freemangordontadzik: ping20:39
freemangordonkerio: ok. usually iDint send it via mail to me ;)20:39
keriohttp://repository.maemo.org/extras-devel/pool/fremantle/free/source/b/busybox-power/busybox-power_1.20.2power2.tar.gz20:39
freemangordon*iDont20:39
keriosounds legit20:40
freemangordonkerio: come on20:40
keriowhat?20:40
freemangordonit needs -thumbN suffix and such20:40
keriooh so you didn't /ignore me but you do ignore me :'(20:40
* kerio points at the file extension20:40
freemangordonthat is what iDont do before sending it to me, pester him, not me20:41
*** _ade_ has joined #maemo-ssu20:41
freemangordon_ade_: hi20:41
_ade_hi20:41
freemangordonyou could safely ignore these warnings20:41
freemangordon:)20:41
_ade_okay, you get them too?20:41
freemangordonyes20:42
freemangordonthe reason for them is:20:42
freemangordonlinker thinks (for some reason) that object is hardfp, but as it is softfp assertion fails20:42
freemangordonbut produced binary is ok20:43
_ade_one other question: should non-thumb configs also be described for gcc 47?20:43
freemangordonyou may try to pass -mfloat-abi=softfp for your test, to see if it changes the result20:44
freemangordon_ade_: rephrase please20:44
freemangordonconfigs?20:44
_ade_well, thumb is not supported on non thumbs kernel, or?20:44
luffreemangordon: you're right. pending isn't what I need.20:45
freemangordonthumb is supported as it is MPU ISA, but it will blow in your face if a kernel without workarounds is booted. But gcc4.7.2 does not produce thumb binaries by default, you should pass -mthumb if you want it20:46
keriofreemangordon: hm, you just need to add a new entry in the changelog and add the dep20:46
_ade_okay, that can explain the (larger) sizes I see20:46
freemangordon_ade_:without -mthumb it produces regular ARM ELFs20:47
freemangordonkerio: no, it is maintainer job to do it20:47
_ade_now I understand that20:47
keriofreemangordon: hm20:47
_ade_freemangordon: yet another question: are compiler flags different?20:47
keriofreemangordon: really though, it's exactly the same thing you do for other packages20:48
freemangordon_ade_: you may want to explore the other goodies: -mfpu=neon -ftree-vectorize -fgraphite -lto20:48
freemangordon_ade_: some flags differ. and gcc 4.7.2 has much strict syntax etc. checking20:48
keriohm, what's graphite?20:48
_ade_freemangordon: thanks for explaining this. I could put some remarks about that in the wiki. Got to go work now, sorry20:50
freemangordon_ade_: thanks, np20:50
freemangordonkerio: http://gcc.gnu.org/wiki/Graphite20:50
keriopolyhedral optimization?20:51
keriowtf20:51
freemangordonhttp://gcc.gnu.org/wiki/Graphite/Parallelization20:51
freemangordonluf: see now? why we don;t trust you :P20:52
freemangordonluf: one should read the socket until there is no more datat IIRC20:52
lufWhy? I se no reason :D20:52
luf*see20:53
freemangordonnow my paste works, lemme try to find something useful20:53
freemangordonluf: do you know where the socket is read?20:53
luffreemangordon: It's clear for me from the beginning. The question is how. I'll find the way ;)20:53
kerioluf: you fail at unix forever :'(20:53
freemangordonluf: ioctl(socket,...)20:54
lufkerio: really? :D20:54
freemangordonthe one I wrote20:54
kerioreading a socket isn't guaranteed to return jack shit20:54
luffreemangordon: yes without B ;)20:54
freemangordonkerio: read what I wrote again20:54
luffreemangordon: it's read in the callback function20:55
lufBut you don't want to put the loop there. For sure.20:55
freemangordonkerio: ioctl (socket,FIONREAD,&bytes_available)20:55
luffreemangordon: I'm compiling and I'll test.20:55
freemangordonluf: not there, return bytes avalable and check for 020:56
lufI hoped there is some function for it in glib ...20:56
*** arcean_ has joined #maemo-ssu20:56
luffreemangordon: I know ;)20:56
freemangordonand there MUST be some function in glib for calling a callback20:56
freemangordon(g-timer?) :P20:56
lufIt's the iteration ...20:56
freemangordong_timer20:56
lufBleeee.20:57
lufforget about such shit :)20:57
*** arcean has quit IRC20:58
freemangordonluf: g_main_context_invoke?20:58
*** _ade_ has quit IRC20:58
freemangordonI bet that will do the job20:59
lufNope. I already sent it20:59
lufg_main_context_iteration20:59
freemangordonsent what?20:59
freemangordonnoo, g_main_context_invoke20:59
freemangordoncheck if you have pending bytes to read at the end of callback20:59
freemangordonand do g_main_context_invoke on callback20:59
freemangordon(if there are still bytes)21:00
Palifreemangordon, I will create new kp pre52 build21:00
lufUnderstand.21:00
freemangordonluf: or maybe g_main_context_invoke_full if you want to play with priorities21:00
freemangordonPali: what has changed?21:00
lufFALSE21:01
freemangordonluf: what is FALS?21:01
lufNote that, as with normal idle functions, function should probably return FALSE.  If it returns TRUE, it will be continuously run in a loop (and may prevent this call from returning).21:01
Palisome changes in rx51_battery and bq2415x_charger drivers + enabled some iptables/ipv6 modules21:01
freemangordonPali: great21:01
Paliand sigmask patch21:01
freemangordonaah, yes21:01
freemangordon:D21:01
lufThe function usually returns TRUE ;) so invoke isn't such win.21:02
freemangordonhmm , i will send a mail to zeq tomorrow, it's been too long he is missing21:02
freemangordonluf: then return TRUE until there are no more bytes to read21:02
Palibtw, can merlin1991 import/promote packages in package interface?21:03
freemangordonI *think* he still cannot21:03
merlin1991let me check21:03
luffreemangordon: Ee = no. It calls stop_hci_dev(index); prior to return FALSE. And it's for sure isn't what I want.21:04
freemangordonluf: sorry to ask again, which function is that?21:05
lufAn in case EAGAIN it returns TRUE.21:05
lufio_security_event21:05
freemangordonok21:05
merlin1991maemo.org is slow :/21:05
*** fredrinLap has quit IRC21:07
DocScrutinizer05http://wiki.maemo.org/Community_SSU/known_broken_packages21:08
lufShit I compiled wrong version :D21:09
DocScrutinizer05add fapman there if you take joy in it21:09
DocScrutinizer05don't ask me why I've put it under Community_SSU/21:11
luffreemangordon: I thinking more about it and maybe reading the queue isn't a win as it can ends with stop_hci_dev ...21:12
merlin1991Pali: I still can't21:12
*** fredrinLap has joined #maemo-ssu21:12
Paliok21:13
freemangordonluf: it won't stop if you check if there is anything to read prior to read()21:13
luffreemangordon: there should be also another event in queue ...21:13
*** chainsawbike has quit IRC21:14
freemangordonluf: if you recursively call io_security_event with check if there is anything to read in case of G_IO_IN, everything will work ok21:14
*** chainsawbike has joined #maemo-ssu21:15
freemangordonor wrap io_security_event and do g_main_context_invoke on the wrapper21:16
*** nox- has joined #maemo-ssu21:16
DocScrutinizer05~broken21:17
infobotmethinks broken is mailto:nothing@machine.cx -> http://machine.cx/debian/  or screen shots are at http://nivda.machine.cx or that's sid for you.21:17
DocScrutinizer05~broken-maemo21:18
DocScrutinizer05~broken-maemo is http://wiki.maemo.org/Community_SSU/known_broken_packages see this list for deprecated known borked packages21:18
infobotDocScrutinizer05: okay21:18
kerioDocScrutinizer05: wait, "not running preinst"?21:19
keriowhat the fuck21:19
lufwhile (ioctl(dev->sk, FIONREAD, &bytes) == 0 && bytes > 0) - doesn't work.21:19
freemangordonnot work as in?21:20
freemangordonalso maybe you need g_io_channel_unix_get_fd(chan);21:21
lufYes. It never goes into the loop.21:21
freemangordonwhat is dev->sk?21:21
lufI have no channel in the function. dev->sk is the fd to which is the hci_send_cmd sent.21:22
lufSo it's the right fd.21:22
freemangordonare you sure there is only one fd for read and write?21:23
lufMaybe AF_BLUETOOTH doesn't implement such ioctl call.21:23
freemangordonhmm, could be21:23
luf        chan = g_io_channel_unix_new(dev->sk); - yes I'm sure.21:25
freemangordonluf: according to google it is implemented21:25
freemangordonFIONREAD21:26
freemangordonwhat is errno?21:26
lufI didn't log it.21:26
luf* errno21:26
freemangordonyeah21:26
freemangordonthe fuck, that should work :(21:26
*** fredrinLap has quit IRC21:27
lufIs it implemented in 2.6.28? I'm using KP51 (since yesterday).21:27
DocScrutinizer05kerio: well, maybe running preinst, but to no effect since not showing the requesters in there21:27
freemangordonluf: it should be, lemme check the source21:28
DocScrutinizer05kerio: it's a rough draft21:28
DocScrutinizer05kerio: ...and a wiki anyway21:28
*** dhbiker has joined #maemo-ssu21:30
DocScrutinizer05~lart merlin for wasting percious time on #harmattan / N9-development21:33
* infobot steals merlin's mojo for wasting percious time on #harmattan / N9-development21:33
merlin1991~lart DocScrutinizer05 for larting in general21:33
* infobot lowers DocScrutinizer05's priority for larting in general21:34
DocScrutinizer05look how smart she's with grammar21:34
merlin1991DocScrutinizer05: so you have more reasons for you lart: https://metalab.at/wiki/Hack-A-N921:35
DocScrutinizer05eew, I don't even dare to click that URL21:35
freemangordonluf: what about while(read()== HCI_MAX_EVENT_SIZE)?21:35
DocScrutinizer05since there are no reasonable hacks that can be done to a N921:35
freemangordonI hope events are equal sizes21:36
freemangordonhmm, is it possible that we hist pselect() bug?21:37
freemangordon*hit21:37
luffreemangordon: are you even more crazy me? I can't read messages ... Or do I miss something?21:37
freemangordonluf: I am deffinitely more crazy than you :D21:38
freemangordonwhat do you want me to explain21:38
freemangordon?21:38
lufhow ioctl bullshit can depend on pselect?21:38
freemangordonluf: we are missing a callback call, correct?21:39
freemangordonwhich is not missed in 4.6021:39
lufI don't think so.21:39
lufThere is mode = "off" hack as I sent today ...21:39
freemangordonaaah, yes21:40
freemangordonluf: sory, I am stupid :)21:40
freemangordon*sorry21:40
lufNo you're definitely not stupid. You work on several tasks at same time. I work only on one ;)21:40
freemangordonthen why the hell we are losing our time when nokia is doing the same ugly hack?21:40
freemangordonthat is why ^^^21:41
lufI'm imbecil. I forgot to debug errno . I debug return value (-1) and bytes ... shit.21:41
freemangordon(I am stupid )21:41
lufBecause we're better.21:41
lufAnd it takes some time to my HF to get the operator name so maybe something isn't as good as it should be ;)21:42
freemangordonluf: scratch that, if it is workarounded in the same way in stock, do it the same way and forget21:42
lufWe're real man :D21:42
freemangordonhehe21:42
lufBut the changes are too huge to be sure.21:42
lufBTW I need to destroy the wall using my head ;)21:44
freemangordonwhat's wrong with the wall?21:44
lufJust it exists :D21:44
freemangordonaah, i understand now. go on then :D21:45
lufAnd not set BT name. You know ...21:45
lufAnd at last (not at least) someone said me: don't do it :D21:46
*** fredrinLap has joined #maemo-ssu21:46
freemangordonDocScrutinizer05: http://talk.maemo.org/showpost.php?p=1270100&postcount=77821:49
freemangordonLOL21:49
DocScrutinizer05LOL indeed - 2somehow commented out" W*T*F!21:51
freemangordonluf: what now?21:54
luferrno 2221:54
freemangordoneaccess? hmm, lemme check21:54
luferrno of 22 (Invalid Argument)21:55
lufAre you sure EACCESS?21:55
freemangordonaah21:55
freemangordonno21:55
freemangordoni was going to check21:55
freemangordonwell, it seems it is not supported for AF_BLUETOOTH21:55
luf/usr/include/asm-generic/errno-base.h:#defineEACCES13/* Permission denied */21:55
freemangordonok, ok21:56
luf#defineEINVAL22/* Invalid argument */21:56
freemangordonOK21:56
freemangordon:D21:56
luf:D21:56
freemangordonwell, there are 2 options AIUI:21:56
freemangordon1. use the same trick nokia did21:56
lufIt's not nokia's trick. It's old bluez trick.21:57
freemangordon2. read until there is no more data (if the socket is NONBLOCK)21:57
freemangordonI vote for 121:57
luf2) how to check whan I can't read from it?21:57
lufThat's still the same question from begining :D21:58
freemangordonyou don't need to, read will return !=HCI_MAX_EVENT_SIZE21:59
lufShit I see the possibility. I'm stupid bad guy (let me check ... yes I'm guy) :D21:59
freemangordonluf: though make a note that this is MAX21:59
lufI can test errno after the callback :)21:59
DocScrutinizer05errwut? reading a queue after waiting for signal/callback? that'S a standard pattern, used all over the place22:02
freemangordonyes22:02
freemangordon;)22:03
freemangordonthe question is why it is not implemented in bluez22:03
DocScrutinizer05since bluez obviously written by idiots, otherwise I don't see how using /etc/machinefoo as a semaphore file could come in22:03
DocScrutinizer05*IF* you're using semaphore files, FFS do that in /var/run or similar location, *NOT* in /etc/22:05
freemangordonluf: I think it won't work, frames have different sizes, without len member in the struct22:05
freemangordonso it will be very hard to process all the frames in the queue22:06
luf(08:59:54 PM) luf: I can test errno after the callback :)22:06
freemangordonso?22:06
freemangordonhow does it help, elaborate please, I don;t get it22:06
DocScrutinizer05freemangordon: WUT?????????? dafaq architects losz last synapse22:06
freemangordonDocScrutinizer05: seems so22:07
luffreemangordon: If there is nothing to read it should put EAGAIN into errno.22:07
freemangordonluf: but that is after first unsuccessful read AFAIK22:08
lufThere is no function call after it so I think I can test it.22:08
lufYes. It's what I want ;)22:08
DocScrutinizer05freemangordon: not even implicit len, via msg identifier or sth?22:09
freemangordonDocScrutinizer05: see hci_send_req, they find next frame by adding the size depending on the current frame type22:09
freemangordon(plush header)22:10
freemangordon*plus22:10
freemangordon:(22:10
freemangordonDocScrutinizer05: aah, no22:11
freemangordonMy mistake, hci_event_hdr has plen member22:11
freemangordonluf: ^^^22:11
* DocScrutinizer05 waves and heads out for a pretty well earned friday eve booze22:12
freemangordonluf: see what they do in see hci_send_req, the same should happen in io_security_event22:13
freemangordonluf: isn't hci_send_req a better place for setting the name?22:14
lufIt's not called for such thing. The hci_send_cmd is the same code as in 4.60 ...22:16
freemangordonok22:16
lufBTW check for EAGAIN isn't good option :D22:16
lufI have no running bluetoothd now :D22:17
freemangordonanyway, i'll try to fix the packaging. And I recommend you to use option 1 ;)22:17
luf:D22:18
lufOption 1 is still at web ;)22:18
lufFuck it's not non-blocking :) So it blocks at the read :)22:22
freemangordongreat :D22:22
freemangordonwell, options were reduced :D22:22
lufNo idea why they check EAGAIN :D22:22
freemangordonblocking call can be interrupted IIRC22:23
freemangordondon't ask me when and why22:23
lufSome interrupt or signal or something like that.22:24
lufFuck how the glib checks it?22:24
freemangordonselect22:24
luffreemangordon: true select or poll.22:35
freemangordonshould be true select22:35
freemangordonnot sure of course22:36
lufOk, option 1 :D22:38
freemangordon:D22:38
lufAs usual the wall is harder than my head :)22:39
lufSo I'm leaving today ... bye22:45
freemangordonbye22:45
*** luf has quit IRC22:45
*** NIN101 has quit IRC23:19
*** andre__ has quit IRC23:23
kerioDocScrutinizer05: http://talk.maemo.org/showpost.php?p=1270176&postcount=300 lololololo23:52

Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!