~ubuntu-branches/ubuntu/hardy/steam/hardy

« back to all changes in this revision

Viewing changes to server/net/port/pop3.pike

  • Committer: Bazaar Package Importer
  • Author(s): Alain Schroeder
  • Date: 2006-11-21 16:03:12 UTC
  • mfrom: (2.1.4 feisty)
  • Revision ID: james.westby@ubuntu.com-20061121160312-nf96y6nihzsyd2uv
Tags: 2.2.31-3
Add patch to prevent inconsistent data after shutdown.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
 *  along with this program; if not, write to the Free Software
15
15
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
16
 * 
17
 
 * $Id: pop3.pike,v 1.1.1.1 2005/02/23 14:47:21 cvs Exp $
 
17
 * $Id: pop3.pike,v 1.1.1.1 2006/03/27 12:40:18 exodusd Exp $
18
18
 */
19
19
 
20
 
constant cvs_version="$Id: pop3.pike,v 1.1.1.1 2005/02/23 14:47:21 cvs Exp $";
 
20
constant cvs_version="$Id: pop3.pike,v 1.1.1.1 2006/03/27 12:40:18 exodusd Exp $";
21
21
 
22
22
inherit Stdio.Port;
23
23
 
64
64
    if ( port_nr == 0 ) 
65
65
        port_nr = 6668;
66
66
 
67
 
    if ( !bind(port_nr, setup_port) ) {
68
 
        werror("Failed to bind pop3 port on " + port_nr + " !\n");
 
67
    string ip = _Server->query_config("ip");
 
68
    if ( ! stringp(ip) || sizeof(ip)==0 ) ip = 0;
 
69
    if ( !bind(port_nr, setup_port, ip) ) {
 
70
        werror("Failed to bind pop3 port on "
 
71
            + (stringp(ip) ? ip+":" : "port ") + port_nr + " !\n");
69
72
        return false;
70
73
    }
71
 
    LOG("POP3 Port registered on " + port_nr);
 
74
    LOG("POP3 Port registered on " + (stringp(ip) ? ip+":" : "port ")
 
75
        + port_nr);
72
76
    return true;
73
77
}
74
78