[Freeswitch-svn] [commit] r8124 - in freeswitch/trunk/scripts/contrib/intralanman/PHP: fs_curl fs_sock

Freeswitch SVN intralanman at freeswitch.org
Thu Apr 17 17:43:04 EDT 2008


Author: intralanman
Date: Thu Apr 17 17:43:04 2008
New Revision: 8124

Modified:
   freeswitch/trunk/scripts/contrib/intralanman/PHP/fs_curl/fs_dialplan.php
   freeswitch/trunk/scripts/contrib/intralanman/PHP/fs_sock/fs_sock.php

Log:
couple little bugs i found while testing...


Modified: freeswitch/trunk/scripts/contrib/intralanman/PHP/fs_curl/fs_dialplan.php
==============================================================================
--- freeswitch/trunk/scripts/contrib/intralanman/PHP/fs_curl/fs_dialplan.php	(original)
+++ freeswitch/trunk/scripts/contrib/intralanman/PHP/fs_curl/fs_dialplan.php	Thu Apr 17 17:43:04 2008
@@ -170,6 +170,9 @@
                             }
                             //$this -> debug($app_array);
                             foreach ($app_array as $app) {
+                                if (empty($app['application'])) {
+                                	continue;
+                                }
                                 $this -> xmlw -> startElement($app['type']);
                                 $this -> xmlw -> writeAttribute(
                                 'application', $app['application']
@@ -177,9 +180,9 @@
                                 if (!empty($app['data'])) {
                                     if (array_key_exists('is_cdata', $app)
                                     && $app['is_cdata'] == true) {
-                                        $this -> xmlw -> startElement('data');
+                                        //$this -> xmlw -> startElement('data');
                                         $this -> xmlw -> writeCdata($app['data']);
-                                        $this -> xmlw -> endElement();
+                                        //$this -> xmlw -> endElement();
                                     } else {
                                         $this -> xmlw -> writeAttribute(
                                         'data', $app['data']

Modified: freeswitch/trunk/scripts/contrib/intralanman/PHP/fs_sock/fs_sock.php
==============================================================================
--- freeswitch/trunk/scripts/contrib/intralanman/PHP/fs_sock/fs_sock.php	(original)
+++ freeswitch/trunk/scripts/contrib/intralanman/PHP/fs_sock/fs_sock.php	Thu Apr 17 17:43:04 2008
@@ -220,6 +220,8 @@
      * @return array
      */
     private function sock_get_length($content_len) {
+        $len = 0;
+        $content = null;
         $this -> debug("calling sock_get_length with length of $content_len");
         //for ($i=0; $i<$content_len; $i+=strlen($orig_line)) {
         while ($orig_line = fgets($this -> sock, BUFFER_SIZE)) {
@@ -409,7 +411,7 @@
             } else {
                 if (is_array($_SERVER)
                 && array_key_exists('HTTP_HOST', $_SERVER)) {
-                    printf("<pre>%s%s</pre>\r\n"
+                    printf("<!--%s%s-->\r\n"
                     , str_repeat(' ', $spaces)
                     , htmlentities($input)
                     );



More information about the Freeswitch-svn mailing list