[asterisk-commits] pcadach: branch pcadach/chan_h323-live r42841 -
/team/pcadach/chan_h323-live/...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Tue Sep 12 09:29:08 MST 2006
Author: pcadach
Date: Tue Sep 12 11:29:07 2006
New Revision: 42841
URL: http://svn.digium.com/view/asterisk?rev=42841&view=rev
Log:
Don't kill negative PID otherwise it will shut down the system!!!
Modified:
team/pcadach/chan_h323-live/res/res_musiconhold.c
Modified: team/pcadach/chan_h323-live/res/res_musiconhold.c
URL: http://svn.digium.com/view/asterisk/team/pcadach/chan_h323-live/res/res_musiconhold.c?rev=42841&r1=42840&r2=42841&view=diff
==============================================================================
--- team/pcadach/chan_h323-live/res/res_musiconhold.c (original)
+++ team/pcadach/chan_h323-live/res/res_musiconhold.c Tue Sep 12 11:29:07 2006
@@ -525,7 +525,7 @@
close(class->srcfd);
class->srcfd = -1;
pthread_testcancel();
- if (class->pid) {
+ if (class->pid > 0) {
kill(class->pid, SIGHUP);
usleep(100000);
kill(class->pid, SIGTERM);
@@ -1095,7 +1095,7 @@
AST_LIST_LOCK(&mohclasses);
while ((moh = AST_LIST_REMOVE_HEAD(&mohclasses, list))) {
- if (moh->pid) {
+ if (moh->pid > 0) {
ast_log(LOG_DEBUG, "killing %d!\n", moh->pid);
stime = time(NULL) + 2;
pid = moh->pid;
More information about the asterisk-commits
mailing list