Fix issues triggered when xpost fails: replace call to get_proxy (which 
errors); make a copy of the job args (that you don't delete from) so that the 
job can run multiple times in case of failure.

        Patch by exor674. 

diffs (36 lines):

diff -r 1524067c3278 -r 64f0c8961635 
cgi-bin/DW/External/XPostProtocol/LJXMLRPC.pm
--- a/cgi-bin/DW/External/XPostProtocol/LJXMLRPC.pm     Thu Sep 03 16:31:33 
2009 +0000
+++ b/cgi-bin/DW/External/XPostProtocol/LJXMLRPC.pm     Thu Sep 03 16:49:29 
2009 +0000
@@ -43,9 +43,9 @@ sub _skeleton {
 # LJ-XMLRPC library class.
 sub _call_xmlrpc {
     my ($self, $xmlrpc, $mode, $req) = @_;
-    
+
     my $result = eval { $xmlrpc->call("LJ.XMLRPC.$mode", $req) };
-    
+
     if ($result) {
         if ($result->fault) {
             # error from server
@@ -64,7 +64,7 @@ sub _call_xmlrpc {
         # connection error
         return {
             success => 0,
-            error => LJ::Lang::ml("xpost.error.connection", { url => 
$xmlrpc->get_proxy })
+            error => LJ::Lang::ml("xpost.error.connection", { url => 
$xmlrpc->proxy->endpoint })
         } 
     }
 }
diff -r 1524067c3278 -r 64f0c8961635 cgi-bin/DW/Worker/XPostWorker.pm
--- a/cgi-bin/DW/Worker/XPostWorker.pm  Thu Sep 03 16:31:33 2009 +0000
+++ b/cgi-bin/DW/Worker/XPostWorker.pm  Thu Sep 03 16:49:29 2009 +0000
@@ -48,7 +48,7 @@ sub work {
 sub work {
     my ($class, $job) = @_;
 
-    my $arg = $job->arg;
+    my $arg = { %{$job->arg} };
 
     my ($uid, $ditemid, $acctid, $password, $auth_challenge, $auth_response, 
$delete) = map { delete $arg->{$_} } qw( uid ditemid accountid password 
auth_challenge auth_response delete );
 
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to