]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix linger support in esl client lib
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 25 Feb 2011 22:13:16 +0000 (16:13 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 25 Feb 2011 22:13:24 +0000 (16:13 -0600)
libs/esl/src/esl.c

index cd103ecd1759a37dfb905322d3f2ea582c208be0..b0bc311ce0f97a05bc7261e1f424990a8fe9f568 100644 (file)
@@ -1066,7 +1066,10 @@ ESL_DECLARE(esl_status_t) esl_recv_event(esl_handle_t *handle, int check_q, esl_
                hval = esl_event_get_header(revent, "content-type");
 
                if (!esl_safe_strcasecmp(hval, "text/disconnect-notice") && revent->body) {
-                       goto fail;
+                       const char *dval = esl_event_get_header(revent, "content-disposition");
+                       if (esl_strlen_zero(dval) || strcasecmp(dval, "linger")) {
+                               goto fail;
+                       }
                }
                
                if (revent->body) {