]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Corrected patch applied in revision r82887.
authorDoug Bailey <dbailey@digium.com>
Tue, 18 Sep 2007 21:49:32 +0000 (21:49 +0000)
committerDoug Bailey <dbailey@digium.com>
Tue, 18 Sep 2007 21:49:32 +0000 (21:49 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@82913 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/manager.c

index 6bd4a4e156e479ba32561a99b6e1096d291e26f0..1964bfdfd89a11813b2b07f6c679c504b3bb2a3c 100644 (file)
@@ -1985,16 +1985,13 @@ static int process_events(struct mansession *s)
                        if (s->fd > -1) {
                                if (!ret && ast_carefulwrite(s->fd, eqe->eventdata, strlen(eqe->eventdata), s->writetimeout) < 0)
                                        ret = -1;
-                       } else {
-                               if (!s->outputstr && !(s->outputstr = ast_calloc(1, sizeof(*s->outputstr)))) {
-                                       ast_mutex_unlock(&s->__lock);
-                                       return;
-                               }
-                               ast_dynamic_str_append(&s->outputstr, 0, "%s", buf->str);
-                       }
-                                  }
-                                  unuse_eventqent(s->eventq);
-                                  s->eventq = eqe;
+                       } else if (!s->outputstr && !(s->outputstr = ast_calloc(1, sizeof(*s->outputstr)))) 
+                               ret = -1;
+                       else 
+                               ast_dynamic_str_append(&s->outputstr, 0, "%s", eqe->eventdata);
+               }
+               unuse_eventqent(s->eventq);
+               s->eventq = eqe;
        }
        ast_mutex_unlock(&s->__lock);
        return ret;