? Entries.Log
? temp.diff
Index: secondlife.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/secondlife/secondlife.module,v
retrieving revision 1.4.2.3
diff -r1.4.2.3 secondlife.module
2d1
< 
21,23c20,22
<     'title'              => t('Second Life'),
<     'description'        => t('Settings for the Second Life Framework module.'),
<     'page callback'      => 'drupal_get_form',
---
>     'title'                       => t('Second Life'),
>     'description'             => t('Settings for the Second Life Framework module.'),
>     'page callback'         => 'drupal_get_form',
25,26c24,25
<     'access arguments'   => array('administer site configuration'),
<     'type'               => MENU_NORMAL_ITEM,
---
>     'access arguments'  => array('administer site configuration'),
>     'type'                      => MENU_NORMAL_ITEM,
30,32c29,31
<     'page callback'     => 'secondlife_request',
<     'access callback'   => TRUE,
<     'type'              => MENU_LOCAL_TASK
---
>     'page callback'       => 'secondlife_request',
>     'access callback'    => TRUE,
>     'type'                    => MENU_LOCAL_TASK
47,50c46,49
<     '#type'          => 'textfield',
<     '#title'         => t('Allowed Ips'),
<     '#default_value' => variable_get('secondlife_allowed_ips', SECONDLIFE_LINDEN_SERVERS),
<     '#description'   => t('Enter the allowed Ips separated by a comma.'),
---
>     '#type'               => 'textfield',
>     '#title'                => t('Allowed Ips'),
>     '#default_value'  => variable_get('secondlife_allowed_ips', SECONDLIFE_LINDEN_SERVERS),
>     '#description'      => t('Enter the allowed Ips separated by a comma.'),
54,57c53,56
<     '#type'          => 'textfield',
<     '#title'         => t('Debugging enabled ?'),
<     '#default_value' => variable_get('secondlife_debug', ''),
<     '#description'   => t('Enable debugging output of server/client interactions. Enter the full path name of the file to write the debugging output to, such as /tmp/secondlife.debug. It must be writable to the user who runs your web server. Leave blank for no debugging'),
---
>     '#type'               => 'textfield',
>     '#title'                => t('Debugging enabled ?'),
>     '#default_value'  => variable_get('secondlife_debug', ''),
>     '#description'      => t('Enable debugging output of server/client interactions. Enter the full path name of the file to write the debugging output to, such as /tmp/secondlife.debug. It must be writable to the user who runs your web server. Leave blank for no debugging'),
61,65c60,64
<     '#type'          => 'radios',
<     '#title'         => t('Enable timing of requests ?'),
<     '#default_value' => variable_get('secondlife_timer', 0),
<     '#options'       => array( 0 => t('Disabled'), 1 => t('Enabled') ),
<     '#description'   => t('Select whether you want to record timing information for how much it takes to process requests from the clients. A "timer=" is send with the response to the client, and if also writting to the debugging output (if enabled).'),
---
>     '#type'               => 'radios',
>     '#title'                => t('Enable timing of requests ?'),
>     '#default_value'  => variable_get('secondlife_timer', 0),
>     '#options'           => array( 0 => t('Disabled'), 1 => t('Enabled') ),
>     '#description'      => t('Select whether you want to record timing information for how much it takes to process requests from the clients. A "timer=" is send with the response to the client, and if also writting to the debugging output (if enabled).'),
69,70c68,69
<     '#type'        => 'fieldset',
<     '#title'       => t('Separators'),
---
>     '#type'          => 'fieldset',
>     '#title'           => t('Separators'),
75,77c74,76
<     '#type'          => 'textfield',
<     '#title'         => t('Arguments separator'),
<     '#size'          => 5,
---
>     '#type'               => 'textfield',
>     '#title'               => t('Arguments separator'),
>     '#size'               => 5,
79c78
<     '#description'   => t('Enter the separator string for arguments.'),
---
>     '#description'     => t('Enter the separator string for arguments.'),
83,86c82,85
<     '#type'        => 'fieldset',
<     '#title'       => t('Fields Names'),
<     '#collapsible' => TRUE,
<     '#collapsed'   => TRUE,
---
>     '#type'           => 'fieldset',
>     '#title'            => t('Fields Names'),
>     '#collapsible'  => TRUE,
>     '#collapsed'    => TRUE,
89,90c88,89
<     '#type'          => 'textfield',
<     '#title'         => t('App'),
---
>     '#type'               => 'textfield',
>     '#title'               => t('App'),
94,96c93,95
<     '#type'          => 'textfield',
<     '#title'         => t('Cmd'),
<     '#default_value' => variable_get('secondlife_cmd', 'cmd'),
---
>     '#type'                => 'textfield',
>     '#title'                => t('Cmd'),
>     '#default_value'  => variable_get('secondlife_cmd', 'cmd'),
99,100c98,99
<     '#type'          => 'textfield',
<     '#title'         => t('Arg'),
---
>     '#type'               => 'textfield',
>     '#title'               => t('Arg'),
112,113c111,112
<   foreach( $ll_subnets as $network) {
<     if(secondlife_netmatch($network,$_SERVER['REMOTE_ADDR'] )) {
---
>   foreach ($ll_subnets as $network) {
>     if (secondlife_netmatch($network,$_SERVER['REMOTE_ADDR'])) {
118c117
<   if ( !$is_ll ) {
---
>   if (!$is_ll) {
157c156
<   foreach($_SERVER as $key => $value) {
---
>   foreach ($_SERVER as $key => $value) {
161c160
<   foreach($_POST as $key => $value) {
---
>   foreach ($_POST as $key => $value) {
167c166
<   $sl->objectkey    = $_SERVER['HTTP_X_SECONDLIFE_OBJECT_KEY'];
---
>   $sl->objectkey      = $_SERVER['HTTP_X_SECONDLIFE_OBJECT_KEY'];
169,175c168,174
<   $sl->ownerkey     = $_SERVER['HTTP_X_SECONDLIFE_OWNER_KEY'];
<   $sl->ownername    = $_SERVER['HTTP_X_SECONDLIFE_OWNER_NAME'];
<   $sl->region       = $_SERVER['HTTP_X_SECONDLIFE_REGION'];
<   $sl->position     = $_SERVER['HTTP_X_SECONDLIFE_LOCAL_POSITION'];
<   $sl->app          = $_POST[variable_get('secondlife_app', 'app')];
<   $sl->cmd          = $_POST[variable_get('secondlife_cmd', 'cmd')];
<   $sl->arg          = $_POST[variable_get('secondlife_arg', 'arg')];
---
>   $sl->ownerkey      = $_SERVER['HTTP_X_SECONDLIFE_OWNER_KEY'];
>   $sl->ownername   = $_SERVER['HTTP_X_SECONDLIFE_OWNER_NAME'];
>   $sl->region           = $_SERVER['HTTP_X_SECONDLIFE_REGION'];
>   $sl->position         = $_SERVER['HTTP_X_SECONDLIFE_LOCAL_POSITION'];
>   $sl->app               = $_POST[variable_get('secondlife_app', 'app')];
>   $sl->cmd              = $_POST[variable_get('secondlife_cmd', 'cmd')];
>   $sl->arg               = $_POST[variable_get('secondlife_arg', 'arg')];
188c187
<   secondlife_debug("SL: " . print_r($sl, TRUE) . "\n", FILE_APPEND);
---
>   secondlife_debug("SL: ". print_r($sl, TRUE). "\n", FILE_APPEND);
197c196
<   foreach(explode(variable_get('secondlife_args_separator', ':'), $arg) as $pair) {
---
>   foreach (explode(variable_get('secondlife_args_separator', ':'), $arg) as $pair) {
212c211
<   foreach($sl->response as $key => $value) {
---
>   foreach ($sl->response as $key => $value) {
219c218
<       foreach($sl->response as $key => $value) {
---
>       foreach ($sl->response as $key => $value) {
269c268
<   $mask =  long2ip($x) == $ip_arr[1] ? $x : 0xffffffff << (32 - $ip_arr[1]);
---
>   $mask = long2ip($x) == $ip_arr[1] ? $x : 0xffffffff << (32 - $ip_arr[1]);
280,284c279,283
<   $ids = stripos($src,$left) + strlen($left);
<   if($ids === false) return false;
<   $ide = stripos($src,$right,$ids);
<   if($ide === false) return false;
<   return(substr($src,$ids,$ide - $ids));
---
>   $ids = stripos($src, $left) + strlen($left);
>   if ($ids === false) return false;
>   $ide = stripos($src, $right, $ids);
>   if ($ide === false) return false;
>   return(substr($src, $ids, $ide - $ids));
303c302
<   fputs($socket, "Content-length: ".strlen($xml)."\r\n");
---
>   fputs($socket, "Content-length: ". strlen($xml)."\r\n");
315,316c314,315
<   $sVal = secondlife_get_data_between($response, 'StringValue</name><value><string>','</string>');
<   $iVal = secondlife_get_data_between($response, '<value><int>','</int></value>');
---
>   $sVal = secondlife_get_data_between($response, 'StringValue</name><value><string>', '</string>');
>   $iVal = secondlife_get_data_between($response, '<value><int>', '</int></value>');
