[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[4544] branches/1.3
- Subject: SF.net SVN: ledger-smb:[4544] branches/1.3
- From: ..hidden..
- Date: Sat, 24 Mar 2012 08:04:56 +0000
Revision: 4544
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4544&view=rev
Author: einhverfr
Date: 2012-03-24 08:04:56 +0000 (Sat, 24 Mar 2012)
Log Message:
-----------
Fixed pos ignores pd_proto and always connects tcp (Chris T, bug 3458112
Modified Paths:
--------------
branches/1.3/Changelog
branches/1.3/bin/pos.pl
Modified: branches/1.3/Changelog
===================================================================
--- branches/1.3/Changelog 2012-03-24 07:32:00 UTC (rev 4543)
+++ branches/1.3/Changelog 2012-03-24 08:04:56 UTC (rev 4544)
@@ -18,6 +18,7 @@
* Fixed POD issues with lsmb-request.pl (h/t Robert C) (Chris T item 3472648)
* Fixed means of adding parts/editing pricelist missing (Chris T, bug 3442163)
* Fixed unknown db detected as SQL-Ledger (Chris T, bug 3510039)
+* Fixed pos ignores pd_proto and always connects tcp (Chris T, bug 3458112)
Andres B is Andres Basile
Modified: branches/1.3/bin/pos.pl
===================================================================
--- branches/1.3/bin/pos.pl 2012-03-24 07:32:00 UTC (rev 4543)
+++ branches/1.3/bin/pos.pl 2012-03-24 08:04:56 UTC (rev 4544)
@@ -49,21 +49,6 @@
1;
# end
-sub custom_send_to_pd{
- socket(SOCK, 2, 1, getprotobynumber($pos_config{'pd_proto'}));
- connect(SOCK, $pos_config{'pd_dest'});
- my $rn = $numrows - 1;
- my $ds_string = sprintf (
- '%s%s @ $%-7.2f%s%s%s',
- $pd_control{'new_line'},
- $form->{"qty_$rn"},
- $form->{"sellprice_$rn"},
- $pd_control{'new_line'},
- "Subtotal: \$".sprintf('%-7.2f', $form->{'invtotal'})
- );
- print SOCK $ds_string;
- close SOCK;
-}
sub open_drawer{
require "pos.conf.pl";
@@ -84,7 +69,10 @@
}
sub send_to_pd {
- socket( SOCK, 2, 1, getprotobynumber( $pos_config{'pd_proto'} ) );
+ my $sock_type = SOCK_STREAM;
+ $sock_type = SOCK_DGRAM if $pos_config{'pd_proto'} eq 'udp';
+ socket( SOCK, PF_INET, $sock_type,
+ getprotobynumber( $pos_config{'pd_proto'} ) );
connect( SOCK, $pos_config{'pd_dest'} );
my $rn = $numrows - 1;
my $ds_string = sprintf(
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.