ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/s_misc.c
(Generate patch)

Comparing:
ircd-hybrid/src/s_misc.c (file contents), Revision 31 by knight, Sun Oct 2 20:34:05 2005 UTC vs.
ircd-hybrid-8/src/s_misc.c (file contents), Revision 1233 by michael, Thu Sep 22 20:53:07 2011 UTC

# Line 86 | Line 86 | date(time_t lclock)
86    if (minswest < 0)
87      minswest = -minswest;
88  
89 <  ircsprintf(buf, "%s %s %d %d -- %02u:%02u:%02u %c%02u:%02u",
90 <             weekdays[lt->tm_wday], months[lt->tm_mon],lt->tm_mday,
91 <             lt->tm_year + 1900, lt->tm_hour, lt->tm_min, lt->tm_sec,
92 <             plus, minswest/60, minswest%60);
89 >  snprintf(buf, sizeof(buf), "%s %s %d %d -- %02u:%02u:%02u %c%02u:%02u",
90 >           weekdays[lt->tm_wday], months[lt->tm_mon],lt->tm_mday,
91 >           lt->tm_year + 1900, lt->tm_hour, lt->tm_min, lt->tm_sec,
92 >           plus, minswest/60, minswest%60);
93    return buf;
94   }
95  
# Line 108 | Line 108 | smalldate(time_t lclock)
108    gm = &gmbuf;
109    lt = localtime(&lclock);
110    
111 <  ircsprintf(buf, "%d/%d/%d %02d.%02d",
112 <             lt->tm_year + 1900, lt->tm_mon + 1, lt->tm_mday,
113 <             lt->tm_hour, lt->tm_min);
111 >  snprintf(buf, sizeof(buf), "%d/%d/%d %02d.%02d",
112 >           lt->tm_year + 1900, lt->tm_mon + 1, lt->tm_mday,
113 >           lt->tm_hour, lt->tm_min);
114  
115    return buf;
116   }
117  
118 /* small_file_date()
119 * Make a small YYYYMMDD formatted string suitable for a
120 * dated file stamp.
121 */
122 char *
123 small_file_date(time_t lclock)
124 {
125  static char timebuffer[MAX_DATE_STRING];
126  struct tm *tmptr;
127
128  if (!lclock)
129    time(&lclock);
130
131  tmptr = localtime(&lclock);
132  strftime(timebuffer, MAX_DATE_STRING, "%Y%m%d", tmptr);
133
134  return timebuffer;
135 }
136
118   #ifdef HAVE_LIBCRYPTO
119   char *
120 < ssl_get_cipher(SSL *ssl)
120 > ssl_get_cipher(const SSL *ssl)
121   {
122 <  static char buffer[128];
123 <  const char *name = NULL;
143 <  int bits;
144 <
145 <  switch (ssl->session->ssl_version)
146 <  {
147 <    case SSL2_VERSION:
148 <      name = "SSLv2";
149 <      break;
150 <
151 <    case SSL3_VERSION:
152 <      name = "SSLv3";
153 <      break;
154 <
155 <    case TLS1_VERSION:
156 <      name = "TLSv1";
157 <      break;
158 <
159 <    default:
160 <      name = "UNKNOWN";
161 <  }
122 >  static char buffer[IRCD_BUFSIZE / 4];
123 >  int bits = 0;
124  
125    SSL_CIPHER_get_bits(SSL_get_current_cipher(ssl), &bits);
126  
127 <  snprintf(buffer, sizeof(buffer), "%s %s-%d",
128 <           name, SSL_get_cipher(ssl), bits);
127 >  snprintf(buffer, sizeof(buffer), "%s %s-%d", SSL_get_version(ssl),
128 >           SSL_get_cipher(ssl), bits);
129    
130    return buffer;
131   }

Comparing:
ircd-hybrid/src/s_misc.c (property svn:keywords), Revision 31 by knight, Sun Oct 2 20:34:05 2005 UTC vs.
ircd-hybrid-8/src/s_misc.c (property svn:keywords), Revision 1233 by michael, Thu Sep 22 20:53:07 2011 UTC

# Line 1 | Line 1
1 < "Id Revision"
1 > Id Revision

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)