sofar/buxton — pull request #20 by ikeydoherty (2013-10-24 15:56:06+00:00)
Title: Begin implementing set-value via wire protocol

I'm doing a lot out of tree right now because I need to disable smack on my local build-box, but this code does actually work.
Some output from my earlier tests:
```
[ikey@localhost buxton]$ sudo ./bt-daemon
Added fd 4 to our poll list (accepting=1)
Added fd 3 to our poll list (accepting=0)
./bt-daemon: Started
New client fd 5 connected through fd 4
Added fd 5 to our poll list (accepting=0)
fgetxattr(): no security.SMACK64 label
fgetxattr(): label=""
New packet from UID 0, PID 24429
Recieved 3 parameters in set message
String value: base
String value: SomeRandomLengthedKey
String value: Some stupidly long value that really has no business being in a settings daemon anyway :)
Discarded 312 bytes on fd 0
Removing fd 5 from our list
Closed connection from fd 5
[ikey@localhost buxton]
```
This won't be testable *quite* yet because we've not added errors + responses in, these require 2 way communication. I'll follow up with some commits in a separate branch or even ammend this one, but I'm putting this here mainly as reference, so that we can see how the protocol works (requires not closing socket in libbuxton)