ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/ermyth/src/servtree.C
(Generate patch)

Comparing cvsroot/ermyth/src/servtree.C (file contents):
Revision 1.4 by pippijn, Tue Aug 28 17:08:12 2007 UTC vs.
Revision 1.5 by pippijn, Thu Aug 30 19:56:26 2007 UTC

3 * Rights to this code are documented in doc/pod/license.pod. 3 * Rights to this code are documented in doc/pod/license.pod.
4 * 4 *
5 * Services binary tree manipulation. (add_service, del_service, et al.) 5 * Services binary tree manipulation. (add_service, del_service, et al.)
6 */ 6 */
7 7
8static char const rcsid[] = "$Id: servtree.C,v 1.4 2007/08/28 17:08:12 pippijn Exp $"; 8static char const rcsid[] = "$Id: servtree.C,v 1.5 2007/08/30 19:56:26 pippijn Exp $";
9 9
10#include "atheme.h" 10#include "atheme.h"
11#include <boost/foreach.hpp> 11#include <boost/foreach.hpp>
12 12
13service_map services; 13service_map services;
107 107
108 phandler->quit_sts (sptr->me, "Service unloaded."); 108 phandler->quit_sts (sptr->me, "Service unloaded.");
109 user_delete (sptr->me); 109 user_delete (sptr->me);
110 sptr->me = NULL; 110 sptr->me = NULL;
111 sptr->handler = NULL; 111 sptr->handler = NULL;
112 sfree (sptr->disp); /* service_name() does an alloc() */ 112 sfree (sptr->disp); /* service_name() does a salloc() */
113 sfree (sptr->name); 113 sfree (sptr->name);
114 sfree (sptr->user); 114 sfree (sptr->user);
115 sfree (sptr->host); 115 sfree (sptr->host);
116 sfree (sptr->real); 116 sfree (sptr->real);
117 sfree (sptr->uid); 117 sfree (sptr->uid);
170} 170}
171 171
172char * 172char *
173service_name (char const * const name) 173service_name (char const * const name)
174{ 174{
175 char *buf = alloc<char> (BUFSIZE); 175 char *buf = salloc<char> (BUFSIZE);
176 176
177 snprintf (buf, BUFSIZE, "%s%s%s", name, (config_options.secure) ? "@" : "", (config_options.secure) ? me.name : ""); 177 snprintf (buf, BUFSIZE, "%s%s%s", name, (config_options.secure) ? "@" : "", (config_options.secure) ? me.name : "");
178 178
179 return buf; 179 return buf;
180} 180}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines