Commit graph

6335 commits

Author SHA1 Message Date
Joey Hess
1d04dff4f0 split out xmpp utilities 2012-10-26 14:44:36 -04:00
Joey Hess
82b7e835e4 run xmpp test in bound thread 2012-10-26 14:39:22 -04:00
Joey Hess
07494cbb4b XMPP configuration form
Currently relies on SRV being set, or the JID's hostname being the server
hostname and the port being default. Future work: Allow manual
configuration of user name, hostname, and port.
2012-10-26 14:17:09 -04:00
Joey Hess
a11fb94c65 SRV record construction 2012-10-26 13:03:08 -04:00
Joey Hess
5544ca2fb8 build fix with pairing disabled 2012-10-26 12:56:19 -04:00
Joey Hess
8916ff1a6c hook up SRV lookups for XMPP 2012-10-26 12:55:29 -04:00
Joey Hess
0b1cf3a766 Merge branch 'master' into xmpp
Conflicts:
	Assistant/Threads/MountWatcher.hs
	Assistant/Threads/NetWatcher.hs
2012-10-26 00:10:41 -04:00
Joey Hess
ef7b53e784 improved dbus error handling
Now when the dbus connection is dropped, it'll fall back to polling.

I could make it try to reconnect, but there's a FD leak in the dbus
library, so not yet.
2012-10-26 00:02:03 -04:00
Joey Hess
43c9732940 Merge branch 'master' of ssh://git-annex.branchable.com 2012-10-25 18:18:20 -04:00
Joey Hess
7ee0ffaeb9 Use USER and HOME environment when set, and only fall back to getpwent, which doesn't work with LDAP or NIS. 2012-10-25 18:17:54 -04:00
Joey Hess
d23aea28eb add the SRV library, forgot to add 2012-10-25 17:56:03 -04:00
Joey Hess
a0bdb2bb00 SRV lookup library
This uses the ADNS library, if available. Otherwise, the host program.

I anticipate that cabal users won't easily get hsdns installed, since
it's a Haskell binding to a C library. And using host is just fine, as
long as the system has it.
2012-10-25 17:54:00 -04:00
https://www.google.com/accounts/o8/id?id=AItOawniayrgSdVLUc3c6bf93VbO-_HT4hzxmyo
63a0bfd591 Added a comment 2012-10-25 21:29:05 +00:00
Joey Hess
2018de53a3 correction 2012-10-25 17:16:58 -04:00
Joey Hess
20452653a4 Merge branch 'master' of ssh://git-annex.branchable.com 2012-10-25 17:14:26 -04:00
Joey Hess
d98101b41f blog for the day 2012-10-25 17:12:07 -04:00
Joey Hess
c23c942c2c better bound thread 2012-10-25 16:51:01 -04:00
Joey Hess
4aaa8665e1 add template for xmpp, not used yet 2012-10-25 16:50:41 -04:00
ka7
4722bc29f4 Added a comment: ok, that worked. 2012-10-25 20:15:26 +00:00
Joey Hess
fe96b28b4d convert the assistant to use a bound thread for XMPP
This *may* solve the segfault I was seeing when the XMPP library called
startTLS. My hypothesis is as follows:

* TLS is documented
  (http://www.gnu.org/software/gnutls/manual/gnutls.html#Thread-safety)
  thread safe, but only when a single thread accesses it.
* forkIO threads are not bound to an OS thread, so it was possible for
  the threaded runtime to run part of the XMPP code on one thread, and
  then switch to another thread later.

So, forkOS, with its bound threads, should be used for the XMPP thread.
Since the crash doesn't happen reliably, I am not yet sure about this fix.

Note that I kept all the other threads in the assistant unbound, because
bound threads have significantly higher overhead.
2012-10-25 15:47:27 -04:00
http://joeyh.name/
a9bae392b2 Added a comment 2012-10-25 18:52:52 +00:00
Joey Hess
52a48d1a78 Merge branch 'master' into xmpp 2012-10-25 14:43:55 -04:00
Joey Hess
b846a69451 Re-enable dbus, using a new version of the library that fixes the memory leak.
For now, when dbus goes away, the assistant keeps running but does not fall
back or reconnect. To do so needs more changes to the DBus library; in
particular a connectSessionWith and connectSystemWith to let me specify
my own clientThreadRunner.
2012-10-25 14:32:30 -04:00
Joey Hess
ed48c49cf9 todo 2012-10-25 14:04:18 -04:00
Joey Hess
8c9c8e3110 only use one push attribute
When pushing to multiple UUIDs, combine them all into a single push
attribute.
2012-10-25 13:31:45 -04:00
Joey Hess
91c0c7b9ef switch from presence toggle hack to git-annex tag in presence extended content
Push notifications are actually working over XMPP now!
2012-10-25 13:04:43 -04:00
Joey Hess
041c99c175 Merge remote-tracking branch 'origin/master' into xmpp
Conflicts:
	doc/design/assistant/cloud.mdwn
2012-10-25 13:04:25 -04:00
https://www.google.com/accounts/o8/id?id=AItOawniayrgSdVLUc3c6bf93VbO-_HT4hzxmyo
07c6aa31b1 2012-10-25 16:08:44 +00:00
http://adamspiers.myopenid.com/
7ea529cf2a explain relationship of pairing to git remotes 2012-10-25 11:44:15 +00:00
http://lj.rossia.org/users/imz/
55bf506bb0 Mark up the link so that someone interested can follow it. 2012-10-25 09:31:26 +00:00
137.132.250.13
6239b24270 poll vote (Google Drive) 2012-10-25 05:47:30 +00:00
Joey Hess
9cdbfa764e configure: Check that checksum programs produce correct checksums. + bitter rant
So, it might be called sha1sum, or on some other OS, it might be called
sha1. It might be hidden away off of PATH on that OS. That's just expected
insanity; UNIX has been this way since 1980's. And these days, nobody even
gives the flying flip about standards that we briefly did in the 90's
after the first round of unix wars.

But it's the 2010's now, and we've certainly learned something.
So, let's make it so sometimes sha1 is a crazy program that wants to run as
root so it can lock memory while prompting for a passphrase, and outputting
binary garbage. Yes, that'd be wise. Let's package that in major Linux
distros, too, so users can stumble over it.
2012-10-25 00:05:17 -04:00
http://joeyh.name/
e36e54884e Added a comment 2012-10-25 03:33:29 +00:00
http://joeyh.name/
69a7321b65 Added a comment: it's a git repository... 2012-10-25 03:29:20 +00:00
Steve
6f0557e661 2012-10-25 00:34:06 +00:00
Joey Hess
1d955d1332 Merge branch 'master' of ssh://git-annex.branchable.com 2012-10-24 20:06:27 -04:00
Joey Hess
75ad5b062a add xmpp page 2012-10-24 20:05:45 -04:00
Steve
2240cafbaa Added a comment: no need to merge 2012-10-24 23:52:30 +00:00
Steve
7b061cc7dd Added a comment: web and hook special remotes 2012-10-24 23:26:54 +00:00
Joey Hess
52d380d7f0 add a separate field for the JID 2012-10-24 19:09:02 -04:00
http://ciffer.net/~svend/
c46a822223 Added a comment: git checkout 2012-10-24 22:50:05 +00:00
http://joeyh.name/
6768238da5 Added a comment 2012-10-24 22:44:41 +00:00
http://www.openid.albertlash.com/openid/
a74b896982 Added a comment: It works! 2012-10-24 22:00:31 +00:00
Joey Hess
145202f21e flip availablility
Seems presence notifications are not sent to clients that have marked
themselves unavailable. (Testing with google talk.)

This is the death knell for the presence hack, because it has to stay
available, and even the toggle to unavailable and back could cause it to
miss a notification. Still, flipped it so it basically works, for now.
2012-10-24 17:23:21 -04:00
ka7
1d3a9dd2d5 2012-10-24 21:13:12 +00:00
ka7
f95f509d16 2012-10-24 21:10:55 +00:00
Joey Hess
422b426460 pull from one of the remotes in a push notification
Still need to do something about transfer queueing, however. This could be
a real can of worms.
2012-10-24 16:21:45 -04:00
Joey Hess
32254488da Merge branch 'master' into xmpp 2012-10-24 15:58:48 -04:00
Joey Hess
9aa9cb5bcf blog for the day 2012-10-24 15:56:33 -04:00
Joey Hess
32497feb2a initial implementation of XMPP push notifier (untested)
Lacking error handling, reconnection, credentials configuration,
and doesn't actually do anything when it receives an incoming notification.

Other than that, it might work! :)
2012-10-24 15:42:02 -04:00