Mercurial > hg
view mcabber/contrib/eventcmd @ 409:82064124324d
Fix a SIGPIPE issue when connecting to the server
This change fixes a SIGPIPE when cw_nb_connect() is called too fast after
make_nb_netsocket(). In this case getsockopt() reports a wrong value (no
error) and the first jab_send_raw() in jconn.c gets a SIGPIPE.
The delay in jabglue.c can then be removed.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sat, 27 Aug 2005 22:20:03 +0200 |
parents | c5a7a7273986 |
children | 2fd528c49173 |
line wrap: on
line source
#! /bin/sh # # Sample events script for mcabber # Plays a sound when receiving a message # # To use this script, set the "events_command" option to the path of # the script (see the mcabberrc.example file for an example) # # MiKael, 2005-07-15 # The following sound comes with the gtkboard package, # you can modify this line to play another one... CMD_MSG_IN="/usr/bin/play /usr/share/sounds/gtkboard/machine_move.ogg" event=$1 arg1=$2 arg2=$3 if [ $event == "MSG" ]; then case "$arg1" in IN) # Incoming message from buddy $arg2 $CMD_MSG_IN > /dev/null 2>&1 ;; OUT) # Outgoing message for buddy $arg2 ;; esac elif [ $event == "STATUS" ]; then # Buddy $arg2 status is $arg1 (_, O, I, F, D, N, A) echo > /dev/null fi