Commit graph

6319 commits

Author SHA1 Message Date
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
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
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
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
Joey Hess
21c27fed21 also remove -ignore-package monads-fd
My previous change should mean I no longer need that hack.
2012-10-24 14:46:31 -04:00
Joey Hess
9856641ef1 deal with mtl/monads-tf conflict
I had been using -ignore-package monads-tf to deal with this, but
the XMPP library uses monads-tf, so that also ignores it. Instead,
use PackageImports to force use of mtl in my own code.
2012-10-24 14:43:32 -04:00
Joey Hess
04ab4bd93a avoid building pushnotifier when there's no xmpp library installed 2012-10-24 14:39:38 -04:00
Joey Hess
ae8a3ab31e added push notifier thread, currently a no-op
Hooked up everything that needs to notify on pushes. Note that
syncNewRemote does not notify. This is probably ok, and I'd need to thread
more state through to make it do so.

This is only set up to support a single push notification method; I didn't
use a NotificationBroadcaster. Partly because I don't yet know what info
about pushes needs to be communicated, so my data types are only
preliminary.
2012-10-24 13:38:28 -04:00
Joey Hess
6b6ce30b42 use a newtype for better type safety 2012-10-24 13:15:31 -04:00
Joey Hess
892d691ffd Merge branch 'master' into xmpp 2012-10-24 12:54:14 -04:00
93.220.117.141
981aefaa06 poll vote (Google Drive) 2012-10-24 16:11:38 +00:00
http://www.openid.albertlash.com/openid/
dd3886ae32 2012-10-24 15:54:07 +00:00
http://joeyh.name/
31702db8a6 Added a comment 2012-10-24 15:50:40 +00:00
Joey Hess
100d798b44 Merge branch 'master' of ssh://git-annex.branchable.com 2012-10-24 11:48:39 -04:00
Joey Hess
70c8324a72 simplify 2012-10-24 11:48:10 -04:00
http://www.openid.albertlash.com/openid/
6227cd055d Added a comment: What to do? 2012-10-24 15:47:16 +00:00
Joey Hess
031bdf77b6 think I had the tagged right the 1st time 2012-10-24 11:46:31 -04:00
Joey Hess
034dace252 ahah 2012-10-24 11:45:00 -04:00
Joey Hess
78c7025781 erm, I forget how this pagespec works 2012-10-24 11:44:14 -04:00
Joey Hess
8eae88af4a fix tag matching 2012-10-24 11:43:21 -04:00