Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 219092 | Differences between
and this patch

Collapse All | Expand All

(-)postal-0.69.orig/basictcp.h (+2 lines)
Lines 47-57 Link Here
47
47
48
#ifdef USE_SSL
48
#ifdef USE_SSL
49
  // after calling Connect() and getting high-level protocol ready call
49
  // after calling Connect() and getting high-level protocol ready call
50
  // ConnectTLS() to start TLS.
50
  // ConnectTLS() to start TLS.
51
  int ConnectTLS();
51
  int ConnectTLS();
52
#endif
52
  int disconnect();
53
  int disconnect();
54
#ifdef USE_SSL
53
  int isTLS() { return m_isTLS; }
55
  int isTLS() { return m_isTLS; }
54
#endif
56
#endif
55
57
56
  // returns negative error or the number of bytes read
58
  // returns negative error or the number of bytes read
57
  int readLine(char *buf, int bufSize, bool stripCR = false, int timeout = 60);
59
  int readLine(char *buf, int bufSize, bool stripCR = false, int timeout = 60);
(-)postal-0.69.orig/bhm.cpp (-1 / +7 lines)
Lines 259-269 Link Here
259
  return t.readLine(buf, bufSize, stripCR, timeout);
259
  return t.readLine(buf, bufSize, stripCR, timeout);
260
}
260
}
261
261
262
void do_work(thread_data *td)
262
void do_work(thread_data *td)
263
{
263
{
264
  base_tcp t(td->fd, log, td->debug, &res, td->ssl);
264
  base_tcp t(td->fd, log, td->debug, &res
265
#ifdef USE_SSL
266
	, td->ssl
267
#endif
268
		);
265
  struct sockaddr_in name;
269
  struct sockaddr_in name;
266
  socklen_t namelen = sizeof(name);
270
  socklen_t namelen = sizeof(name);
267
  char buf[1024];
271
  char buf[1024];
268
272
269
  int rc = getsockname(td->fd, (sockaddr *)&name, &namelen);
273
  int rc = getsockname(td->fd, (sockaddr *)&name, &namelen);
Lines 474-484 Link Here
474
      thread_data *td = (thread_data *)malloc(sizeof(thread_data));
478
      thread_data *td = (thread_data *)malloc(sizeof(thread_data));
475
      td->threadNum = i;
479
      td->threadNum = i;
476
      td->fd = fd;
480
      td->fd = fd;
477
      memcpy(&td->addr, &addr, sizeof(addr));
481
      memcpy(&td->addr, &addr, sizeof(addr));
478
      td->debug = debug ? new Logit(*debug, i) : NULL;
482
      td->debug = debug ? new Logit(*debug, i) : NULL;
483
#ifdef USE_SSL
479
      td->ssl = use_ssl;
484
      td->ssl = use_ssl;
485
#endif
480
      int p = pthread_create(&thread_info[i], &attr, smtp_worker, PVOID(td));
486
      int p = pthread_create(&thread_info[i], &attr, smtp_worker, PVOID(td));
481
      pthread_attr_destroy(&attr);
487
      pthread_attr_destroy(&attr);
482
      if(p)
488
      if(p)
483
      {
489
      {
484
        fprintf(stderr, "Can't create a thread.\n");
490
        fprintf(stderr, "Can't create a thread.\n");
(-)postal-0.69.orig/configure.in (-6 / +19 lines)
Lines 13-27 Link Here
13
else
13
else
14
  stripping="-s"
14
  stripping="-s"
15
fi
15
fi
16
16
17
AC_ARG_ENABLE(openssl,
17
AC_ARG_ENABLE(openssl,
18
      [  --disable-openssl  disables openssl support],
18
	[  --disable-openssl	disable openssl support],
19
      DISABLEOPENSSL=$opensslval, DISABLEOPENSSL=no)
19
	[ if test $enableval = yes; then
20
		DISABLEOPENSSL=no
21
	else
22
		DISABLEOPENSSL=yes
23
	fi ]
24
	,
25
	[ DISABLEOPENSSL=no ])
26
20
AC_ARG_ENABLE(gnutls,
27
AC_ARG_ENABLE(gnutls,
21
      [  --disable-gnutls  disables gnutls support],
28
	[  --disable-gnutls  disables gnutls support],
22
      DISABLEGNUTLS=$gnutlsval, DISABLEGNUTLS=no)
29
	[if test $enableval = yes; then
30
		DISABLEGNUTLS=no
31
	else
32
		DISABLEGNUTLS=yes
33
	fi]	
34
	,
35
	[ DISABLEGNUTLS=no ])
23
36
24
dnl Checks for programs.
37
dnl Checks for programs.
25
AC_LANG_CPLUSPLUS
38
AC_LANG_CPLUSPLUS
26
AC_PROG_CC
39
AC_PROG_CC
27
AC_PROG_CXX
40
AC_PROG_CXX
Lines 118-134 Link Here
118
crypt_ldflags=
131
crypt_ldflags=
119
if [[ "$GNUTLS" = "no" ]]; then
132
if [[ "$GNUTLS" = "no" ]]; then
120
  gnutls=""
133
  gnutls=""
121
else
134
else
122
  gnutls="#define USE_GNUTLS"
135
  gnutls="#define USE_GNUTLS"
123
  crypt_ldflags="$extra_ldflags -lgnutls"
136
  crypt_ldflags=" -lgnutls"
124
fi
137
fi
125
if [[ "$OPENSSL" = "no" ]]; then
138
if [[ "$OPENSSL" = "no" ]]; then
126
  openssl=""
139
  openssl=""
127
else
140
else
128
  openssl="#define USE_OPENSSL"
141
  openssl="#define USE_OPENSSL"
129
  crypt_ldflags="$extra_ldflags -lssl -lcrypto"
142
  crypt_ldflags=" -lssl -lcrypto"
130
fi
143
fi
131
144
132
AC_SUBST(large_file)
145
AC_SUBST(large_file)
133
large_file=""
146
large_file=""
134
147
(-)postal-0.69.orig/Makefile.in (-1 / +1 lines)
Lines 16-26 Link Here
16
INSTALL=@INSTALL@
16
INSTALL=@INSTALL@
17
17
18
TESTEXE=ex-test
18
TESTEXE=ex-test
19
BASEOBJS=userlist.o thread.o results.o address.o tcp.o cmd5.o mutex.o logit.o expand.o @extra_objs@
19
BASEOBJS=userlist.o thread.o results.o address.o tcp.o cmd5.o mutex.o logit.o expand.o @extra_objs@
20
LFLAGS=-lstdc++ @extra_ldflags@
20
LFLAGS=-lstdc++ @extra_ldflags@
21
CRYPTLFLAGS=-lstdc++ @crypt_ldflags@
21
CRYPTLFLAGS=-lstdc++ @extra_ldflags@  @crypt_ldflags@ 
22
22
23
23
24
ALLOBJS=$(BASEOBJS) smtp.o client.o basictcp.o bhmusers.o smtpserver.o
24
ALLOBJS=$(BASEOBJS) smtp.o client.o basictcp.o bhmusers.o smtpserver.o
25
25
26
postal: postal.cpp $(BASEOBJS) postal.h smtp.o
26
postal: postal.cpp $(BASEOBJS) postal.h smtp.o

Return to bug 219092