]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
scgi updates
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 23 May 2012 18:12:32 +0000 (13:12 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 23 May 2012 18:12:32 +0000 (13:12 -0500)
libs/libscgi/src/include/scgi.h
libs/libscgi/src/scgi.c
src/mod/xml_int/mod_xml_scgi/mod_xml_scgi.c

index b6a51658587f9063d5aa5fa2f4945e3a3f812ac6..575a45f7f9bca57e829a65fffb598ec6d704bc72 100644 (file)
@@ -198,7 +198,7 @@ SCGI_DECLARE(scgi_status_t) scgi_bind(const char *host, scgi_port_t port, scgi_s
 SCGI_DECLARE(scgi_status_t) scgi_accept(scgi_socket_t server_sock, scgi_socket_t *client_sock_p, struct sockaddr_in *echoClntAddr);
 
 #ifndef WIN32
-#define closesocket(x) shutdown(x, 2); close(x)
+#define closesocket(x) close(x)
 #endif
 
 #ifdef __cplusplus
index 9f8e9956e0f46c335d92c7b93385c743ebb34b43..df05b5980b0915538596b23bf34c60a14b357918 100644 (file)
@@ -384,10 +384,6 @@ SCGI_DECLARE(scgi_status_t) scgi_disconnect(scgi_handle_t *handle)
                return SCGI_FAIL;
        }
 
-       if (!handle->sock) {
-               abort();
-       }
-
        if (handle->sock != SCGI_SOCK_INVALID) {
                closesocket(handle->sock);
                handle->sock = SCGI_SOCK_INVALID;
index 97b6bdcf0a7927b325d54b0e0dfe5a5e181d503b..6ee62d6ac91cc7992ecce2340b0d0af286f2aa8e 100644 (file)
@@ -145,7 +145,7 @@ static switch_xml_t xml_url_fetch(const char *section, const char *tag_name, con
 
                scgi_disconnect(&handle);
 
-               if (len < 0) {
+               if (len < 0 && (!txt || !strlen(txt))) {
                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "DEBUG:\nURL: %s Connection Read Failed: [%s]\n", binding->url, handle.err);
                        goto end;
                }