murgo / IrssiNotifier

notifies android phones from irc private messages
Apache License 2.0
169 stars 63 forks source link

Script: simplify encryption, try to avoid getting stuck #162

Closed qvr closed 10 years ago

qvr commented 10 years ago

Remove fork() from encryption, by passing shared fd to openssl instead of named pipes. If the fork() failed for any reason in encrypt(), the openssl process would block forever waiting for data in the pipe.

Also fix a situation where if the first fork() in send_to_api() failed, script would not retry ever again as the global $forked variable wasn't reset.

This should hopefully fix murgo/IrssiNotifier#161

murgo commented 10 years ago

Thanks a lot again!