default to a session cookie instead of setting an explicit timeout, weird timezone...
[freeside.git] / FS / bin / freeside-xmlrpcd
old mode 100644 (file)
new mode 100755 (executable)
index e22d0f0..b6f15ce
@@ -1,14 +1,17 @@
 #!/usr/bin/perl
 
+=head1 NAME
+
+freeside-xmlrpcd
+
+=cut
+
 use FS::Daemon::Preforking qw( freeside_init1 freeside_init2 daemon_run );
 
 use FS::XMLRPC_Lite; #XMLRPC::Lite for XMLRPC::Serializer
                      #and XMLRPC::Transport::HTTP
 
 use FS::Conf;
-
-##use FS::ClientAPI qw( load_clientapi_modules );
-##use FS::ClientAPI_XMLRPC; #FS::SelfService::XMLRPC;
 use FS::API;
 
 #freeside xmlrpc.cgi
@@ -19,17 +22,9 @@ my %typelookup = (
 );
 
 use constant ME => 'xmlrpcd';
-
-#
-
 freeside_init1(ME);
-
-#load_clientapi_modules;
-
 freeside_init2(ME);
 
-#FS::ClientAPI::Signup::clear_cache();
-
 my $conf = new FS::Conf;
 die "not running; xmlrpc_api conf option is off\n"
   unless $conf->exists('xmlrpc_api');
@@ -51,6 +46,8 @@ daemon_run( 'port' => 8008, 'handle_request' =>
     $soap->request($request);
     $soap->handle;
 
+    $FS::UID::dbh->commit() if $FS::UID::dbh; #XXX handle commit error
+
     return $soap->response;
   }
 );