SMTP: properly use const, and extern "C".

* This fixes having it picked up in the mail_daemon. That shouldn't have
  worked in the last three years...
This commit is contained in:
Axel Dörfler
2015-11-07 17:07:06 +01:00
parent 5ab027fdc9
commit d5607aa971
2 changed files with 7 additions and 6 deletions
@@ -1,5 +1,5 @@
/* /*
* Copyright 2007-2013, Haiku, Inc. All rights reserved. * Copyright 2007-2015, Haiku, Inc. All rights reserved.
* Copyright 2001-2002 Dr. Zoidberg Enterprises. All rights reserved. * Copyright 2001-2002 Dr. Zoidberg Enterprises. All rights reserved.
* Copyright 2011, Clemens Zeidler <[email protected]> * Copyright 2011, Clemens Zeidler <[email protected]>
* *
@@ -246,7 +246,7 @@ SplitChallengeIntoMap(BString str, map<BString,BString>& m)
// #pragma mark - // #pragma mark -
SMTPProtocol::SMTPProtocol(BMailAccountSettings& settings) SMTPProtocol::SMTPProtocol(const BMailAccountSettings& settings)
: :
BOutboundMailProtocol(settings), BOutboundMailProtocol(settings),
fAuthType(0) fAuthType(0)
@@ -1061,8 +1061,8 @@ SMTPProtocol::SendCommand(const char *cmd)
// #pragma mark - // #pragma mark -
BOutboundMailProtocol* extern "C" BOutboundMailProtocol*
instantiate_outbound_protocol(BMailAccountSettings& settings) instantiate_outbound_protocol(const BMailAccountSettings& settings)
{ {
return new SMTPProtocol(settings); return new SMTPProtocol(settings);
} }
@@ -1,5 +1,5 @@
/* /*
* Copyright 2007-2012, Haiku Inc. All Rights Reserved. * Copyright 2007-2015, Haiku Inc. All Rights Reserved.
* Copyright 2001-2002 Dr. Zoidberg Enterprises. All rights reserved. * Copyright 2001-2002 Dr. Zoidberg Enterprises. All rights reserved.
* Copyright 2011, Clemens Zeidler <[email protected]> * Copyright 2011, Clemens Zeidler <[email protected]>
* *
@@ -23,7 +23,8 @@
class SMTPProtocol : public BOutboundMailProtocol { class SMTPProtocol : public BOutboundMailProtocol {
public: public:
SMTPProtocol(BMailAccountSettings& settings); SMTPProtocol(
const BMailAccountSettings& settings);
virtual ~SMTPProtocol(); virtual ~SMTPProtocol();
status_t Connect(); status_t Connect();